1use crate::services::Sendable;
2pub enum GoProSetting {
10 Resolution(Hero11Resolution),
11 Fps(Hero11FPS),
12 AutoPowerDown(Hero11AutoPowerDown),
13 VideoDigitalLense(Hero11VideoDigitalLense),
14 PhotoDigitalLense(Hero11PhotoDigitalLense),
15 TimeLapseDigitalLense(Hero11TimeLapseDigitalLense),
16 MediaFormat(Hero11MediaFormat),
17 AntiFlicker(AntiFlicker),
18 Hypersmooth(Hero11Hypersmooth),
19 HorizonLeveling(Hero11HorizonLeveling),
20 MaxLense(Hero11MaxLense),
21 Hindsight(Hero11Hindsight),
22 Controls(Hero11Controls),
23 Speed(Hero11Speed),
24 NightPhoto(Hero11NightPhoto),
25 WirelessBand(Hero11WirelessBand),
26 TrailLength(Hero11TrailLength),
27 VideoMode(Hero11VideoMode),
28}
29
30use GoProSetting as GPS;
31impl Sendable for GPS {
32 fn as_bytes(&self) -> &'static [u8] {
33 match self {
34 GPS::Resolution(r) => r.as_bytes(),
35 GPS::Fps(f) => f.as_bytes(),
36 GPS::AutoPowerDown(apd) => apd.as_bytes(),
37 GPS::VideoDigitalLense(vdl) => vdl.as_bytes(),
38 GPS::PhotoDigitalLense(pdl) => pdl.as_bytes(),
39 GPS::TimeLapseDigitalLense(tdl) => tdl.as_bytes(),
40 GPS::MediaFormat(mf) => mf.as_bytes(),
41 GPS::AntiFlicker(af) => af.as_bytes(),
42 GPS::Hypersmooth(hs) => hs.as_bytes(),
43 GPS::HorizonLeveling(hl) => hl.as_bytes(),
44 GPS::MaxLense(ml) => ml.as_bytes(),
45 GPS::Hindsight(h) => h.as_bytes(),
46 GPS::Controls(c) => c.as_bytes(),
47 GPS::Speed(s) => s.as_bytes(),
48 GPS::NightPhoto(np) => np.as_bytes(),
49 GPS::WirelessBand(wb) => wb.as_bytes(),
50 GPS::TrailLength(tl) => tl.as_bytes(),
51 GPS::VideoMode(vm) => vm.as_bytes(),
52 }
53 }
54
55 fn response_value_bytes(&self) -> &'static [u8] {
56 match self {
57 GPS::Resolution(r) => r.response_value_bytes(),
58 GPS::Fps(f) => f.response_value_bytes(),
59 GPS::AutoPowerDown(apd) => apd.response_value_bytes(),
60 GPS::VideoDigitalLense(vdl) => vdl.response_value_bytes(),
61 GPS::PhotoDigitalLense(pdl) => pdl.response_value_bytes(),
62 GPS::TimeLapseDigitalLense(tdl) => tdl.response_value_bytes(),
63 GPS::MediaFormat(mf) => mf.response_value_bytes(),
64 GPS::AntiFlicker(af) => af.response_value_bytes(),
65 GPS::Hypersmooth(hs) => hs.response_value_bytes(),
66 GPS::HorizonLeveling(hl) => hl.response_value_bytes(),
67 GPS::MaxLense(ml) => ml.response_value_bytes(),
68 GPS::Hindsight(h) => h.response_value_bytes(),
69 GPS::Controls(c) => c.response_value_bytes(),
70 GPS::Speed(s) => s.response_value_bytes(),
71 GPS::NightPhoto(np) => np.response_value_bytes(),
72 GPS::WirelessBand(wb) => wb.response_value_bytes(),
73 GPS::TrailLength(tl) => tl.response_value_bytes(),
74 GPS::VideoMode(vm) => vm.response_value_bytes(),
75 }
76 }
77}
78
79impl AsRef<GoProSetting> for GoProSetting {
80 fn as_ref(&self) -> &GoProSetting {
81 self
82 }
83}
84
85#[allow(non_camel_case_types)]
86pub enum Hero11Resolution {
87 Res4K,
88 Res2_7K,
89 Res2_7K_4x3,
90 Res1080,
91 Res4K_4x3,
92 Res5_3K_8x7,
93 Res5_3K_4x3,
94 Res4K_8x7,
95 Res5_3K,
96}
97
98impl AsRef<Hero11Resolution> for Hero11Resolution {
99 fn as_ref(&self) -> &Hero11Resolution {
100 self
101 }
102}
103
104use Hero11Resolution as H11R; impl Sendable for H11R {
106 fn as_bytes(&self) -> &'static [u8] {
107 match self.as_ref() {
108 H11R::Res4K => &[0x03, 0x02, 0x01, 0x01],
109 H11R::Res2_7K => &[0x03, 0x02, 0x01, 0x04],
110 H11R::Res2_7K_4x3 => &[0x03, 0x02, 0x01, 0x06],
111 H11R::Res1080 => &[0x03, 0x02, 0x01, 0x09],
112 H11R::Res4K_4x3 => &[0x03, 0x02, 0x01, 0x12],
113 H11R::Res5_3K_8x7 => &[0x03, 0x02, 0x01, 0x1A],
114 H11R::Res5_3K_4x3 => &[0x03, 0x02, 0x01, 0x1B],
115 H11R::Res4K_8x7 => &[0x03, 0x02, 0x01, 0x1C],
116 H11R::Res5_3K => &[0x03, 0x02, 0x01, 0x64],
117 }
118 }
119
120 fn response_value_bytes(&self) -> &'static [u8] {
121 &[0x02, 0x02, 0x00]
122 }
123}
124
125pub enum Hero11FPS {
126 Fps240,
127 Fps120,
128 Fps100,
129 Fps60,
130 Fps50,
131 Fps30,
132 Fps25,
133 Fps24,
134 Fps200,
135}
136
137impl AsRef<Hero11FPS> for Hero11FPS {
138 fn as_ref(&self) -> &Hero11FPS {
139 self
140 }
141}
142
143impl Sendable for Hero11FPS {
144 fn as_bytes(&self) -> &'static [u8] {
145 match self.as_ref() {
146 Hero11FPS::Fps240 => &[0x03, 0x03, 0x01, 0x00],
147 Hero11FPS::Fps120 => &[0x03, 0x03, 0x01, 0x01],
148 Hero11FPS::Fps100 => &[0x03, 0x03, 0x01, 0x02],
149 Hero11FPS::Fps60 => &[0x03, 0x03, 0x01, 0x05],
150 Hero11FPS::Fps50 => &[0x03, 0x03, 0x01, 0x06],
151 Hero11FPS::Fps30 => &[0x03, 0x03, 0x01, 0x08],
152 Hero11FPS::Fps25 => &[0x03, 0x03, 0x01, 0x09],
153 Hero11FPS::Fps24 => &[0x03, 0x03, 0x01, 0x0A],
154 Hero11FPS::Fps200 => &[0x03, 0x03, 0x01, 0x0D],
155 }
156 }
157
158 fn response_value_bytes(&self) -> &'static [u8] {
159 &[0x02, 0x03, 0x00]
160 }
161}
162
163pub enum Hero11AutoPowerDown {
164 Never,
165 OneMinute,
166 FiveMinutes,
167 FifteenMinutes,
168 ThirtyMinutes,
169}
170
171impl AsRef<Hero11AutoPowerDown> for Hero11AutoPowerDown {
172 fn as_ref(&self) -> &Hero11AutoPowerDown {
173 self
174 }
175}
176
177use Hero11AutoPowerDown as H11APD;
178impl Sendable for H11APD {
179 fn as_bytes(&self) -> &'static [u8] {
180 match self.as_ref() {
181 H11APD::Never => &[0x03, 0x3B, 0x01, 0x00],
182 H11APD::OneMinute => &[0x03, 0x3B, 0x01, 0x01],
183 H11APD::FiveMinutes => &[0x03, 0x3B, 0x01, 0x04],
184 H11APD::FifteenMinutes => &[0x03, 0x3B, 0x01, 0x06],
185 H11APD::ThirtyMinutes => &[0x03, 0x3B, 0x01, 0x07],
186 }
187 }
188
189 fn response_value_bytes(&self) -> &'static [u8] {
190 &[0x01, 0x3B, 0x00]
191 }
192}
193
194pub enum Hero11VideoDigitalLense {
195 Wide,
196 Superview,
197 Linear,
198 MaxSuperview,
199 LinearHorizonLeveling,
200 Hyperview,
201 LinearHorizonLock,
202}
203
204impl AsRef<Hero11VideoDigitalLense> for Hero11VideoDigitalLense {
205 fn as_ref(&self) -> &Hero11VideoDigitalLense {
206 self
207 }
208}
209
210use Hero11VideoDigitalLense as H11VDL;
211impl Sendable for H11VDL {
212 fn as_bytes(&self) -> &'static [u8] {
213 match self.as_ref() {
214 H11VDL::Wide => &[0x03, 0x79, 0x01, 0x00],
215 H11VDL::Superview => &[0x03, 0x79, 0x01, 0x03],
216 H11VDL::Linear => &[0x03, 0x79, 0x01, 0x04],
217 H11VDL::MaxSuperview => &[0x03, 0x79, 0x01, 0x07],
218 H11VDL::LinearHorizonLeveling => &[0x03, 0x79, 0x01, 0x08],
219 H11VDL::Hyperview => &[0x03, 0x79, 0x01, 0x09],
220 H11VDL::LinearHorizonLock => &[0x03, 0x79, 0x01, 0x0A],
221 }
222 }
223
224 fn response_value_bytes(&self) -> &'static [u8] {
225 &[0x02, 0x79, 0x00]
226 }
227}
228
229pub enum Hero11PhotoDigitalLense {
230 MaxSuperview,
231 Wide,
232 Linear,
233}
234
235impl AsRef<Hero11PhotoDigitalLense> for Hero11PhotoDigitalLense {
236 fn as_ref(&self) -> &Hero11PhotoDigitalLense {
237 self
238 }
239}
240
241use Hero11PhotoDigitalLense as H11PDL;
242impl Sendable for H11PDL {
243 fn as_bytes(&self) -> &'static [u8] {
244 match self.as_ref() {
245 H11PDL::MaxSuperview => &[0x03, 0x7A, 0x01, 0x64],
246 H11PDL::Wide => &[0x03, 0x7A, 0x01, 0x65],
247 H11PDL::Linear => &[0x03, 0x7A, 0x01, 0x66],
248 }
249 }
250
251 fn response_value_bytes(&self) -> &'static [u8] {
252 &[0x02, 0x7A, 0x00]
253 }
254}
255
256pub enum Hero11TimeLapseDigitalLense {
257 MaxSuperview,
258 Wide,
259 Linear,
260}
261
262impl AsRef<Hero11TimeLapseDigitalLense> for Hero11TimeLapseDigitalLense {
263 fn as_ref(&self) -> &Hero11TimeLapseDigitalLense {
264 self
265 }
266}
267
268use Hero11TimeLapseDigitalLense as H11TDL;
269impl Sendable for H11TDL {
270 fn as_bytes(&self) -> &'static [u8] {
271 match self.as_ref() {
272 H11TDL::MaxSuperview => &[0x03, 0x7B, 0x01, 0x64],
273 H11TDL::Wide => &[0x03, 0x7B, 0x01, 0x65],
274 H11TDL::Linear => &[0x03, 0x7B, 0x01, 0x66],
275 }
276 }
277
278 fn response_value_bytes(&self) -> &'static [u8] {
279 &[0x02, 0x7B, 0x00]
280 }
281}
282
283pub enum Hero11MediaFormat {
284 TimeLapseVideo,
285 TimeLapsePhoto,
286 NightLapsePhoto,
287 NightLapseVideo,
288}
289
290impl AsRef<Hero11MediaFormat> for Hero11MediaFormat {
291 fn as_ref(&self) -> &Hero11MediaFormat {
292 self
293 }
294}
295
296use Hero11MediaFormat as H11MF;
297impl Sendable for H11MF {
298 fn as_bytes(&self) -> &'static [u8] {
299 match self.as_ref() {
300 H11MF::TimeLapseVideo => &[0x03, 0x80, 0x01, 0x0D],
301 H11MF::TimeLapsePhoto => &[0x03, 0x80, 0x01, 0x14],
302 H11MF::NightLapsePhoto => &[0x03, 0x80, 0x01, 0x15],
303 H11MF::NightLapseVideo => &[0x03, 0x80, 0x01, 0x1A],
304 }
305 }
306
307 fn response_value_bytes(&self) -> &'static [u8] {
308 &[0x02, 0x80, 0x00]
309 }
310}
311
312pub enum AntiFlicker {
313 SixtyHertz,
314 FiftyHertz,
315}
316
317impl AsRef<AntiFlicker> for AntiFlicker {
318 fn as_ref(&self) -> &AntiFlicker {
319 self
320 }
321}
322
323use AntiFlicker as AF;
324impl Sendable for AF {
325 fn as_bytes(&self) -> &'static [u8] {
326 match self.as_ref() {
327 AF::SixtyHertz => &[0x03, 0x86, 0x01, 0x02],
328 AF::FiftyHertz => &[0x03, 0x86, 0x01, 0x03],
329 }
330 }
331
332 fn response_value_bytes(&self) -> &'static [u8] {
333 &[0x02, 0x86, 0x00]
334 }
335}
336
337pub enum Hero11Hypersmooth {
338 Off,
339 Low,
340 Boost,
341 Auto,
342}
343
344impl AsRef<Hero11Hypersmooth> for Hero11Hypersmooth {
345 fn as_ref(&self) -> &Hero11Hypersmooth {
346 self
347 }
348}
349
350use Hero11Hypersmooth as H11HS;
351impl Sendable for H11HS {
352 fn as_bytes(&self) -> &'static [u8] {
353 match self.as_ref() {
354 H11HS::Off => &[0x03, 0x87, 0x01, 0x00],
355 H11HS::Low => &[0x03, 0x87, 0x01, 0x01],
356 H11HS::Boost => &[0x03, 0x87, 0x01, 0x03],
357 H11HS::Auto => &[0x03, 0x87, 0x01, 0x04],
358 }
359 }
360
361 fn response_value_bytes(&self) -> &'static [u8] {
362 &[0x02, 0x87, 0x00]
363 }
364}
365
366pub enum Hero11HorizonLeveling {
367 VideoOff,
368 VideoLocked,
369 PhotoOff,
370 PhotoLocked,
371}
372
373impl AsRef<Hero11HorizonLeveling> for Hero11HorizonLeveling {
374 fn as_ref(&self) -> &Hero11HorizonLeveling {
375 self
376 }
377}
378
379use Hero11HorizonLeveling as H11HL;
380impl Sendable for H11HL {
381 fn as_bytes(&self) -> &'static [u8] {
382 match self.as_ref() {
383 H11HL::VideoOff => &[0x03, 0x96, 0x01, 0x00],
384 H11HL::VideoLocked => &[0x03, 0x96, 0x01, 0x02],
385 H11HL::PhotoOff => &[0x03, 0x97, 0x01, 0x00],
386 H11HL::PhotoLocked => &[0x03, 0x97, 0x01, 0x02],
387 }
388 }
389
390 fn response_value_bytes(&self) -> &'static [u8] {
391 match self.as_ref() {
392 H11HL::VideoOff => &[0x02, 0x96, 0x00],
393 H11HL::VideoLocked => &[0x02, 0x96, 0x00],
394 H11HL::PhotoOff => &[0x02, 0x97, 0x00],
395 H11HL::PhotoLocked => &[0x02, 0x97, 0x00],
396 }
397 }
398}
399
400pub enum Hero11MaxLense {
401 Off,
402 On,
403}
404
405impl AsRef<Hero11MaxLense> for Hero11MaxLense {
406 fn as_ref(&self) -> &Hero11MaxLense {
407 self
408 }
409}
410
411use Hero11MaxLense as H11ML;
412impl Sendable for H11ML {
413 fn as_bytes(&self) -> &'static [u8] {
414 match self.as_ref() {
415 H11ML::Off => &[0x03, 0xA2, 0x01, 0x00],
416 H11ML::On => &[0x03, 0xA2, 0x01, 0x01],
417 }
418 }
419
420 fn response_value_bytes(&self) -> &'static [u8] {
421 &[0x02, 0xA2, 0x00]
422 }
423}
424
425pub enum Hero11Hindsight {
426 FifteenSeconds,
427 ThirtySeconds,
428 Off,
429}
430
431impl AsRef<Hero11Hindsight> for Hero11Hindsight {
432 fn as_ref(&self) -> &Hero11Hindsight {
433 self
434 }
435}
436
437use Hero11Hindsight as H11H;
438impl Sendable for H11H {
439 fn as_bytes(&self) -> &'static [u8] {
440 match self.as_ref() {
441 H11H::FifteenSeconds => &[0x03, 0xA7, 0x01, 0x02],
442 H11H::ThirtySeconds => &[0x03, 0xA7, 0x01, 0x03],
443 H11H::Off => &[0x03, 0xA7, 0x01, 0x04],
444 }
445 }
446
447 fn response_value_bytes(&self) -> &'static [u8] {
448 &[0x02, 0xA7, 0x00]
449 }
450}
451
452pub enum Hero11Controls {
453 Easy,
454 Pro,
455}
456
457impl AsRef<Hero11Controls> for Hero11Controls {
458 fn as_ref(&self) -> &Hero11Controls {
459 self
460 }
461}
462
463use Hero11Controls as H11C;
464
465impl Sendable for H11C {
466 fn as_bytes(&self) -> &'static [u8] {
467 match self.as_ref() {
468 H11C::Easy => &[0x03, 0xAF, 0x01, 0x00],
469 H11C::Pro => &[0x03, 0xAF, 0x01, 0x01],
470 }
471 }
472
473 fn response_value_bytes(&self) -> &'static [u8] {
474 &[0x02, 0xAF, 0x00]
475 }
476}
477
478pub enum Hero11Speed {
479 UltraSlowMo8X,
480 SuperSlowMo4X,
481 SlowMo2X,
482 Normal1X,
483 SuperSlowMo4XExtBatt,
484 SlowMo2XExtBatt,
485 Normal1XExtBatt,
486 UltraSlowMo8X50Hz,
487 SuperSlowMo4X50Hz,
488 SlowMo2X50Hz,
489 Normal1X50Hz,
490 SuperSlowMo4XExtBatt50Hz,
491 SlowMo2XExtBatt50Hz,
492 Normal1XExtBatt50Hz,
493 UltraSlowMo8XExtBatt,
494 UltraSlowMo8XExtBatt50Hz,
495 UltraSlowMo8XLongBatt,
496 SuperSlowMo4XLongBatt,
497 SlowMo2XLongBatt,
498 Normal1XLongBatt,
499 UltraSlowMo8XLongBatt50Hz,
500 SuperSlowMo4XLongBatt50Hz,
501 SlowMo2XLongBatt50Hz,
502 Normal1XLongBatt50Hz,
503 SlowMo2X4K,
504 SuperSlowMo4x2_7K,
505 SlowMo2X4K50Hz,
506 SuperSlowMo4x2_7K50Hz,
507}
508
509impl AsRef<Hero11Speed> for Hero11Speed {
510 fn as_ref(&self) -> &Hero11Speed {
511 self
512 }
513}
514
515use Hero11Speed as H11S;
516impl Sendable for H11S {
517 fn as_bytes(&self) -> &'static [u8] {
518 match self.as_ref() {
519 H11S::UltraSlowMo8X => &[0x03, 0xB0, 0x01, 0x00],
520 H11S::SuperSlowMo4X => &[0x03, 0xB0, 0x01, 0x01],
521 H11S::SlowMo2X => &[0x03, 0xB0, 0x01, 0x02],
522 H11S::Normal1X => &[0x03, 0xB0, 0x01, 0x03],
523 H11S::SuperSlowMo4XExtBatt => &[0x03, 0xB0, 0x01, 0x04],
524 H11S::SlowMo2XExtBatt => &[0x03, 0xB0, 0x01, 0x05],
525 H11S::Normal1XExtBatt => &[0x03, 0xB0, 0x01, 0x06],
526 H11S::UltraSlowMo8X50Hz => &[0x03, 0xB0, 0x01, 0x07],
527 H11S::SuperSlowMo4X50Hz => &[0x03, 0xB0, 0x01, 0x08],
528 H11S::SlowMo2X50Hz => &[0x03, 0xB0, 0x01, 0x09],
529 H11S::Normal1X50Hz => &[0x03, 0xB0, 0x01, 0x0A],
530 H11S::SuperSlowMo4XExtBatt50Hz => &[0x03, 0xB0, 0x01, 0x0B],
531 H11S::SlowMo2XExtBatt50Hz => &[0x03, 0xB0, 0x01, 0x0C],
532 H11S::Normal1XExtBatt50Hz => &[0x03, 0xB0, 0x01, 0x0D],
533 H11S::UltraSlowMo8XExtBatt => &[0x03, 0xB0, 0x01, 0x0E],
534 H11S::UltraSlowMo8XExtBatt50Hz => &[0x03, 0xB0, 0x01, 0x0F],
535 H11S::UltraSlowMo8XLongBatt => &[0x03, 0xB0, 0x01, 0x10],
536 H11S::SuperSlowMo4XLongBatt => &[0x03, 0xB0, 0x01, 0x11],
537 H11S::SlowMo2XLongBatt => &[0x03, 0xB0, 0x01, 0x12],
538 H11S::Normal1XLongBatt => &[0x03, 0xB0, 0x01, 0x13],
539 H11S::UltraSlowMo8XLongBatt50Hz => &[0x03, 0xB0, 0x01, 0x14],
540 H11S::SuperSlowMo4XLongBatt50Hz => &[0x03, 0xB0, 0x01, 0x15],
541 H11S::SlowMo2XLongBatt50Hz => &[0x03, 0xB0, 0x01, 0x16],
542 H11S::Normal1XLongBatt50Hz => &[0x03, 0xB0, 0x01, 0x17],
543 H11S::SlowMo2X4K => &[0x03, 0xB0, 0x01, 0x18],
544 H11S::SuperSlowMo4x2_7K => &[0x03, 0xB0, 0x01, 0x19],
545 H11S::SlowMo2X4K50Hz => &[0x03, 0xB0, 0x01, 0x1A],
546 H11S::SuperSlowMo4x2_7K50Hz => &[0x03, 0xB0, 0x01, 0x1B],
547 }
548 }
549
550 fn response_value_bytes(&self) -> &'static [u8] {
551 &[0x02, 0xB0, 0x00]
552 }
553}
554
555pub enum Hero11NightPhoto {
556 Off,
557 On,
558}
559
560impl AsRef<Hero11NightPhoto> for Hero11NightPhoto {
561 fn as_ref(&self) -> &Hero11NightPhoto {
562 self
563 }
564}
565
566use Hero11NightPhoto as H11NP;
567impl Sendable for H11NP {
568 fn as_bytes(&self) -> &'static [u8] {
569 match self.as_ref() {
570 H11NP::Off => &[0x03, 0xB1, 0x01, 0x00],
571 H11NP::On => &[0x03, 0xB1, 0x01, 0x01],
572 }
573 }
574
575 fn response_value_bytes(&self) -> &'static [u8] {
576 &[0x02, 0xB1, 0x00]
577 }
578}
579
580pub enum Hero11WirelessBand {
581 TwoPointFourGhz,
582 FiveGhz,
583}
584
585impl AsRef<Hero11WirelessBand> for Hero11WirelessBand {
586 fn as_ref(&self) -> &Hero11WirelessBand {
587 self
588 }
589}
590
591use Hero11WirelessBand as H11WB;
592impl Sendable for H11WB {
593 fn as_bytes(&self) -> &'static [u8] {
594 match self.as_ref() {
595 H11WB::TwoPointFourGhz => &[0x03, 0xB2, 0x01, 0x00],
596 H11WB::FiveGhz => &[0x03, 0xB2, 0x01, 0x01],
597 }
598 }
599
600 fn response_value_bytes(&self) -> &'static [u8] {
601 &[0x02, 0xB2, 0x00]
602 }
603}
604
605pub enum Hero11TrailLength {
606 Short,
607 Long,
608 Max,
609}
610
611impl AsRef<Hero11TrailLength> for Hero11TrailLength {
612 fn as_ref(&self) -> &Hero11TrailLength {
613 self
614 }
615}
616
617use Hero11TrailLength as H11TL;
618impl Sendable for H11TL {
619 fn as_bytes(&self) -> &'static [u8] {
620 match self.as_ref() {
621 H11TL::Short => &[0x03, 0xB3, 0x01, 0x01],
622 H11TL::Long => &[0x03, 0xB3, 0x01, 0x02],
623 H11TL::Max => &[0x03, 0xB3, 0x01, 0x03],
624 }
625 }
626
627 fn response_value_bytes(&self) -> &'static [u8] {
628 &[0x02, 0xB3, 0x00]
629 }
630}
631
632pub enum Hero11VideoMode {
633 HighestQuality,
634 ExtendedBattery,
635 ExtendedBatteryGreenIcon,
636 LongestBatteryGreenIcon,
637}
638
639impl AsRef<Hero11VideoMode> for Hero11VideoMode {
640 fn as_ref(&self) -> &Hero11VideoMode {
641 self
642 }
643}
644
645use Hero11VideoMode as H11VM;
646impl Sendable for H11VM {
647 fn as_bytes(&self) -> &'static [u8] {
648 match self.as_ref() {
649 H11VM::HighestQuality => &[0x03, 0xB4, 0x01, 0x00],
650 H11VM::ExtendedBattery => &[0x03, 0xB4, 0x01, 0x01],
651 H11VM::ExtendedBatteryGreenIcon => &[0x03, 0xB4, 0x01, 0x65],
652 H11VM::LongestBatteryGreenIcon => &[0x03, 0xB4, 0x01, 0x66],
653 }
654 }
655
656 fn response_value_bytes(&self) -> &'static [u8] {
657 &[0x02, 0xB4, 0x00]
658 }
659}