fit_rust/protocol/
get_field_scale.rs

1use crate::protocol::message_type::MessageType;
2use crate::protocol::MatchScaleFn;
3
4fn match_scale_accelerometer_data(_: usize) -> Option<f32> {
5    None
6}
7fn match_scale_activity(k: usize) -> Option<f32> {
8    match k {
9        0 => Some(1000.0f32),
10        _ => None,
11    }
12}
13fn match_scale_ant_channel_id(_: usize) -> Option<f32> {
14    None
15}
16fn match_scale_ant_rx(k: usize) -> Option<f32> {
17    match k {
18        0 => Some(32768.0f32),
19        _ => None,
20    }
21}
22fn match_scale_ant_tx(k: usize) -> Option<f32> {
23    match k {
24        0 => Some(32768.0f32),
25        _ => None,
26    }
27}
28fn match_scale_aviation_attitude(k: usize) -> Option<f32> {
29    match k {
30        2 => Some(10430.38f32),
31        3 => Some(10430.38f32),
32        4 => Some(100.0f32),
33        5 => Some(100.0f32),
34        6 => Some(1024.0f32),
35        9 => Some(10430.38f32),
36        _ => None,
37    }
38}
39fn match_scale_barometer_data(_: usize) -> Option<f32> {
40    None
41}
42fn match_scale_bike_profile(k: usize) -> Option<f32> {
43    match k {
44        3 => Some(100.0f32),
45        8 => Some(1000.0f32),
46        9 => Some(1000.0f32),
47        10 => Some(10.0f32),
48        11 => Some(10.0f32),
49        19 => Some(2.0f32),
50        _ => None,
51    }
52}
53fn match_scale_blood_pressure(_: usize) -> Option<f32> {
54    None
55}
56fn match_scale_cadence_zone(_: usize) -> Option<f32> {
57    None
58}
59fn match_scale_camera_event(_: usize) -> Option<f32> {
60    None
61}
62fn match_scale_capabilities(_: usize) -> Option<f32> {
63    None
64}
65fn match_scale_climb_pro(_: usize) -> Option<f32> {
66    None
67}
68fn match_scale_connectivity(_: usize) -> Option<f32> {
69    None
70}
71fn match_scale_course(_: usize) -> Option<f32> {
72    None
73}
74fn match_scale_course_point(k: usize) -> Option<f32> {
75    match k {
76        4 => Some(100.0f32),
77        _ => None,
78    }
79}
80fn match_scale_developer_data_id(_: usize) -> Option<f32> {
81    None
82}
83fn match_scale_device_aux_battery_info(k: usize) -> Option<f32> {
84    match k {
85        1 => Some(256.0f32),
86        _ => None,
87    }
88}
89fn match_scale_device_info(k: usize) -> Option<f32> {
90    match k {
91        5 => Some(100.0f32),
92        10 => Some(256.0f32),
93        _ => None,
94    }
95}
96fn match_scale_device_settings(k: usize) -> Option<f32> {
97    match k {
98        5 => Some(4.0f32),
99        _ => None,
100    }
101}
102fn match_scale_dive_alarm(k: usize) -> Option<f32> {
103    match k {
104        0 => Some(1000.0f32),
105        1 => Some(1.0f32),
106        _ => None,
107    }
108}
109fn match_scale_dive_gas(_: usize) -> Option<f32> {
110    None
111}
112fn match_scale_dive_settings(k: usize) -> Option<f32> {
113    match k {
114        6 => Some(100.0f32),
115        7 => Some(100.0f32),
116        8 => Some(100.0f32),
117        17 => Some(1.0f32),
118        18 => Some(1.0f32),
119        _ => None,
120    }
121}
122fn match_scale_dive_summary(k: usize) -> Option<f32> {
123    match k {
124        2 => Some(1000.0f32),
125        3 => Some(1000.0f32),
126        4 => Some(1.0f32),
127        5 => Some(1.0f32),
128        6 => Some(1.0f32),
129        7 => Some(1.0f32),
130        8 => Some(1.0f32),
131        11 => Some(1000.0f32),
132        17 => Some(1000.0f32),
133        22 => Some(1000.0f32),
134        23 => Some(1000.0f32),
135        24 => Some(1000.0f32),
136        25 => Some(1000.0f32),
137        _ => None,
138    }
139}
140fn match_scale_event(k: usize) -> Option<f32> {
141    match k {
142        23 => Some(10.0f32),
143        24 => Some(10.0f32),
144        _ => None,
145    }
146}
147fn match_scale_exd_data_concept_configuration(_: usize) -> Option<f32> {
148    None
149}
150fn match_scale_exd_data_field_configuration(_: usize) -> Option<f32> {
151    None
152}
153fn match_scale_exd_screen_configuration(_: usize) -> Option<f32> {
154    None
155}
156fn match_scale_exercise_title(_: usize) -> Option<f32> {
157    None
158}
159fn match_scale_field_capabilities(_: usize) -> Option<f32> {
160    None
161}
162fn match_scale_field_description(_: usize) -> Option<f32> {
163    None
164}
165fn match_scale_file_capabilities(_: usize) -> Option<f32> {
166    None
167}
168fn match_scale_file_creator(_: usize) -> Option<f32> {
169    None
170}
171fn match_scale_file_id(_: usize) -> Option<f32> {
172    None
173}
174fn match_scale_goal(_: usize) -> Option<f32> {
175    None
176}
177fn match_scale_gps_metadata(k: usize) -> Option<f32> {
178    match k {
179        3 => Some(5.0f32),
180        4 => Some(1000.0f32),
181        5 => Some(100.0f32),
182        7 => Some(100.0f32),
183        _ => None,
184    }
185}
186fn match_scale_gyroscope_data(_: usize) -> Option<f32> {
187    None
188}
189fn match_scale_hr(k: usize) -> Option<f32> {
190    match k {
191        0 => Some(32768.0f32),
192        1 => Some(256.0f32),
193        9 => Some(1024.0f32),
194        10 => Some(1024.0f32),
195        _ => None,
196    }
197}
198fn match_scale_hr_zone(_: usize) -> Option<f32> {
199    None
200}
201fn match_scale_hrm_profile(_: usize) -> Option<f32> {
202    None
203}
204fn match_scale_hrv(k: usize) -> Option<f32> {
205    match k {
206        0 => Some(1000.0f32),
207        _ => None,
208    }
209}
210fn match_scale_jump(k: usize) -> Option<f32> {
211    match k {
212        7 => Some(1000.0f32),
213        8 => Some(1000.0f32),
214        _ => None,
215    }
216}
217fn match_scale_lap(k: usize) -> Option<f32> {
218    match k {
219        7 => Some(1000.0f32),
220        8 => Some(1000.0f32),
221        9 => Some(100.0f32),
222        13 => Some(1000.0f32),
223        14 => Some(1000.0f32),
224        37 => Some(100.0f32),
225        42 => Some(5.0f32),
226        43 => Some(5.0f32),
227        45 => Some(100.0f32),
228        46 => Some(100.0f32),
229        47 => Some(100.0f32),
230        48 => Some(100.0f32),
231        49 => Some(100.0f32),
232        52 => Some(1000.0f32),
233        53 => Some(1000.0f32),
234        54 => Some(1000.0f32),
235        55 => Some(1000.0f32),
236        56 => Some(1000.0f32),
237        57 => Some(1000.0f32),
238        58 => Some(1000.0f32),
239        59 => Some(1000.0f32),
240        60 => Some(1000.0f32),
241        62 => Some(5.0f32),
242        77 => Some(10.0f32),
243        78 => Some(100.0f32),
244        79 => Some(10.0f32),
245        80 => Some(128.0f32),
246        81 => Some(128.0f32),
247        82 => Some(128.0f32),
248        84 => Some(100.0f32),
249        85 => Some(100.0f32),
250        86 => Some(100.0f32),
251        87 => Some(10.0f32),
252        88 => Some(10.0f32),
253        89 => Some(10.0f32),
254        91 => Some(2.0f32),
255        92 => Some(2.0f32),
256        93 => Some(2.0f32),
257        94 => Some(2.0f32),
258        95 => Some(2.0f32),
259        98 => Some(1000.0f32),
260        102 => Some(0.7111111f32),
261        103 => Some(0.7111111f32),
262        104 => Some(0.7111111f32),
263        105 => Some(0.7111111f32),
264        110 => Some(1000.0f32),
265        111 => Some(1000.0f32),
266        112 => Some(5.0f32),
267        113 => Some(5.0f32),
268        114 => Some(5.0f32),
269        117 => Some(2.0f32),
270        118 => Some(100.0f32),
271        119 => Some(100.0f32),
272        120 => Some(10.0f32),
273        121 => Some(1000.0f32),
274        156 => Some(100.0f32),
275        157 => Some(100.0f32),
276        158 => Some(100.0f32),
277        159 => Some(100.0f32),
278        160 => Some(100.0f32),
279        _ => None,
280    }
281}
282fn match_scale_length(k: usize) -> Option<f32> {
283    match k {
284        3 => Some(1000.0f32),
285        4 => Some(1000.0f32),
286        6 => Some(1000.0f32),
287        _ => None,
288    }
289}
290fn match_scale_magnetometer_data(_: usize) -> Option<f32> {
291    None
292}
293fn match_scale_memo_glob(_: usize) -> Option<f32> {
294    None
295}
296fn match_scale_mesg_capabilities(_: usize) -> Option<f32> {
297    None
298}
299fn match_scale_met_zone(k: usize) -> Option<f32> {
300    match k {
301        2 => Some(10.0f32),
302        3 => Some(10.0f32),
303        _ => None,
304    }
305}
306fn match_scale_monitoring(k: usize) -> Option<f32> {
307    match k {
308        2 => Some(100.0f32),
309        3 => Some(2.0f32),
310        4 => Some(1000.0f32),
311        12 => Some(100.0f32),
312        14 => Some(100.0f32),
313        15 => Some(100.0f32),
314        28 => Some(10.0f32),
315        31 => Some(1000.0f32),
316        32 => Some(1000.0f32),
317        _ => None,
318    }
319}
320fn match_scale_monitoring_info(k: usize) -> Option<f32> {
321    match k {
322        3 => Some(5000.0f32),
323        4 => Some(5000.0f32),
324        _ => None,
325    }
326}
327fn match_scale_nmea_sentence(_: usize) -> Option<f32> {
328    None
329}
330fn match_scale_obdii_data(_: usize) -> Option<f32> {
331    None
332}
333fn match_scale_ohr_settings(_: usize) -> Option<f32> {
334    None
335}
336fn match_scale_one_d_sensor_calibration(_: usize) -> Option<f32> {
337    None
338}
339fn match_scale_power_zone(_: usize) -> Option<f32> {
340    None
341}
342fn match_scale_record(k: usize) -> Option<f32> {
343    match k {
344        2 => Some(5.0f32),
345        5 => Some(100.0f32),
346        6 => Some(1000.0f32),
347        8 => Some(100.0f32),
348        9 => Some(100.0f32),
349        11 => Some(1000.0f32),
350        12 => Some(100.0f32),
351        17 => Some(16.0f32),
352        32 => Some(1000.0f32),
353        39 => Some(10.0f32),
354        40 => Some(100.0f32),
355        41 => Some(10.0f32),
356        43 => Some(2.0f32),
357        44 => Some(2.0f32),
358        45 => Some(2.0f32),
359        46 => Some(2.0f32),
360        47 => Some(2.0f32),
361        48 => Some(128.0f32),
362        51 => Some(100.0f32),
363        52 => Some(256.0f32),
364        53 => Some(128.0f32),
365        54 => Some(100.0f32),
366        55 => Some(100.0f32),
367        56 => Some(100.0f32),
368        57 => Some(10.0f32),
369        58 => Some(10.0f32),
370        59 => Some(10.0f32),
371        69 => Some(0.7111111f32),
372        70 => Some(0.7111111f32),
373        71 => Some(0.7111111f32),
374        72 => Some(0.7111111f32),
375        73 => Some(1000.0f32),
376        78 => Some(5.0f32),
377        81 => Some(2.0f32),
378        83 => Some(100.0f32),
379        84 => Some(100.0f32),
380        85 => Some(10.0f32),
381        92 => Some(1000.0f32),
382        93 => Some(1000.0f32),
383        94 => Some(1.0f32),
384        95 => Some(1.0f32),
385        96 => Some(1.0f32),
386        98 => Some(1.0f32),
387        139 => Some(100.0f32),
388        _ => None,
389    }
390}
391fn match_scale_schedule(_: usize) -> Option<f32> {
392    None
393}
394fn match_scale_sdm_profile(k: usize) -> Option<f32> {
395    match k {
396        2 => Some(10.0f32),
397        3 => Some(100.0f32),
398        _ => None,
399    }
400}
401fn match_scale_segment_file(_: usize) -> Option<f32> {
402    None
403}
404fn match_scale_segment_id(_: usize) -> Option<f32> {
405    None
406}
407fn match_scale_segment_lap(k: usize) -> Option<f32> {
408    match k {
409        7 => Some(1000.0f32),
410        8 => Some(1000.0f32),
411        9 => Some(100.0f32),
412        13 => Some(1000.0f32),
413        14 => Some(1000.0f32),
414        34 => Some(5.0f32),
415        35 => Some(5.0f32),
416        37 => Some(100.0f32),
417        38 => Some(100.0f32),
418        39 => Some(100.0f32),
419        40 => Some(100.0f32),
420        41 => Some(100.0f32),
421        44 => Some(1000.0f32),
422        45 => Some(1000.0f32),
423        46 => Some(1000.0f32),
424        47 => Some(1000.0f32),
425        48 => Some(1000.0f32),
426        49 => Some(1000.0f32),
427        50 => Some(1000.0f32),
428        51 => Some(1000.0f32),
429        52 => Some(1000.0f32),
430        54 => Some(5.0f32),
431        56 => Some(1000.0f32),
432        59 => Some(2.0f32),
433        60 => Some(2.0f32),
434        61 => Some(2.0f32),
435        62 => Some(2.0f32),
436        63 => Some(2.0f32),
437        66 => Some(128.0f32),
438        67 => Some(128.0f32),
439        68 => Some(128.0f32),
440        71 => Some(1000.0f32),
441        75 => Some(0.7111111f32),
442        76 => Some(0.7111111f32),
443        77 => Some(0.7111111f32),
444        78 => Some(0.7111111f32),
445        89 => Some(100.0f32),
446        90 => Some(100.0f32),
447        _ => None,
448    }
449}
450fn match_scale_segment_leaderboard_entry(k: usize) -> Option<f32> {
451    match k {
452        4 => Some(1000.0f32),
453        _ => None,
454    }
455}
456fn match_scale_segment_point(k: usize) -> Option<f32> {
457    match k {
458        3 => Some(100.0f32),
459        4 => Some(5.0f32),
460        5 => Some(1000.0f32),
461        _ => None,
462    }
463}
464fn match_scale_session(k: usize) -> Option<f32> {
465    match k {
466        7 => Some(1000.0f32),
467        8 => Some(1000.0f32),
468        9 => Some(100.0f32),
469        14 => Some(1000.0f32),
470        15 => Some(1000.0f32),
471        24 => Some(10.0f32),
472        35 => Some(10.0f32),
473        36 => Some(1000.0f32),
474        41 => Some(10.0f32),
475        42 => Some(100.0f32),
476        44 => Some(100.0f32),
477        49 => Some(5.0f32),
478        50 => Some(5.0f32),
479        52 => Some(100.0f32),
480        53 => Some(100.0f32),
481        54 => Some(100.0f32),
482        55 => Some(100.0f32),
483        56 => Some(100.0f32),
484        59 => Some(1000.0f32),
485        60 => Some(1000.0f32),
486        61 => Some(1000.0f32),
487        62 => Some(1000.0f32),
488        63 => Some(1000.0f32),
489        65 => Some(1000.0f32),
490        66 => Some(1000.0f32),
491        67 => Some(1000.0f32),
492        68 => Some(1000.0f32),
493        69 => Some(1000.0f32),
494        71 => Some(5.0f32),
495        87 => Some(100.0f32),
496        88 => Some(100.0f32),
497        89 => Some(10.0f32),
498        90 => Some(100.0f32),
499        91 => Some(10.0f32),
500        92 => Some(128.0f32),
501        93 => Some(128.0f32),
502        94 => Some(128.0f32),
503        95 => Some(100.0f32),
504        96 => Some(100.0f32),
505        97 => Some(100.0f32),
506        98 => Some(10.0f32),
507        99 => Some(10.0f32),
508        100 => Some(10.0f32),
509        101 => Some(2.0f32),
510        102 => Some(2.0f32),
511        103 => Some(2.0f32),
512        104 => Some(2.0f32),
513        105 => Some(2.0f32),
514        112 => Some(1000.0f32),
515        116 => Some(0.7111111f32),
516        117 => Some(0.7111111f32),
517        118 => Some(0.7111111f32),
518        119 => Some(0.7111111f32),
519        124 => Some(1000.0f32),
520        125 => Some(1000.0f32),
521        126 => Some(5.0f32),
522        127 => Some(5.0f32),
523        128 => Some(5.0f32),
524        131 => Some(2.0f32),
525        132 => Some(100.0f32),
526        133 => Some(100.0f32),
527        134 => Some(10.0f32),
528        137 => Some(10.0f32),
529        139 => Some(1000.0f32),
530        168 => Some(65536.0f32),
531        199 => Some(100.0f32),
532        200 => Some(100.0f32),
533        208 => Some(100.0f32),
534        209 => Some(100.0f32),
535        210 => Some(100.0f32),
536        _ => None,
537    }
538}
539fn match_scale_set(k: usize) -> Option<f32> {
540    match k {
541        0 => Some(1000.0f32),
542        4 => Some(16.0f32),
543        _ => None,
544    }
545}
546fn match_scale_slave_device(_: usize) -> Option<f32> {
547    None
548}
549fn match_scale_software(k: usize) -> Option<f32> {
550    match k {
551        3 => Some(100.0f32),
552        _ => None,
553    }
554}
555fn match_scale_speed_zone(k: usize) -> Option<f32> {
556    match k {
557        0 => Some(1000.0f32),
558        _ => None,
559    }
560}
561fn match_scale_sport(_: usize) -> Option<f32> {
562    None
563}
564fn match_scale_stress_level(_: usize) -> Option<f32> {
565    None
566}
567fn match_scale_three_d_sensor_calibration(k: usize) -> Option<f32> {
568    match k {
569        5 => Some(65535.0f32),
570        _ => None,
571    }
572}
573fn match_scale_timestamp_correlation(k: usize) -> Option<f32> {
574    match k {
575        0 => Some(32768.0f32),
576        2 => Some(32768.0f32),
577        _ => None,
578    }
579}
580fn match_scale_totals(_: usize) -> Option<f32> {
581    None
582}
583fn match_scale_training_file(_: usize) -> Option<f32> {
584    None
585}
586fn match_scale_user_profile(k: usize) -> Option<f32> {
587    match k {
588        3 => Some(100.0f32),
589        4 => Some(10.0f32),
590        31 => Some(1000.0f32),
591        32 => Some(1000.0f32),
592        _ => None,
593    }
594}
595fn match_scale_video(_: usize) -> Option<f32> {
596    None
597}
598fn match_scale_video_clip(_: usize) -> Option<f32> {
599    None
600}
601fn match_scale_video_description(_: usize) -> Option<f32> {
602    None
603}
604fn match_scale_video_frame(_: usize) -> Option<f32> {
605    None
606}
607fn match_scale_video_title(_: usize) -> Option<f32> {
608    None
609}
610fn match_scale_watchface_settings(_: usize) -> Option<f32> {
611    None
612}
613fn match_scale_weather_alert(_: usize) -> Option<f32> {
614    None
615}
616fn match_scale_weather_conditions(k: usize) -> Option<f32> {
617    match k {
618        4 => Some(1000.0f32),
619        _ => None,
620    }
621}
622fn match_scale_weight_scale(k: usize) -> Option<f32> {
623    match k {
624        0 => Some(100.0f32),
625        1 => Some(100.0f32),
626        2 => Some(100.0f32),
627        3 => Some(100.0f32),
628        4 => Some(100.0f32),
629        5 => Some(100.0f32),
630        7 => Some(4.0f32),
631        9 => Some(4.0f32),
632        _ => None,
633    }
634}
635fn match_scale_workout(k: usize) -> Option<f32> {
636    match k {
637        14 => Some(100.0f32),
638        _ => None,
639    }
640}
641fn match_scale_workout_session(k: usize) -> Option<f32> {
642    match k {
643        4 => Some(100.0f32),
644        _ => None,
645    }
646}
647fn match_scale_workout_step(k: usize) -> Option<f32> {
648    match k {
649        12 => Some(100.0f32),
650        _ => None,
651    }
652}
653fn match_scale_zones_target(_: usize) -> Option<f32> {
654    None
655}
656fn match_scale_none(_: usize) -> Option<f32> {
657    return None;
658}
659
660/// Determines whether any SDK-defined `Message` defines a scale for any of its fields.
661///
662/// The method is called with a `MessageType` argument and returns a static closure which is called with a field_id `usize`
663/// and yields an `Option<f32>`.
664///
665/// # Example
666///
667/// ```
668/// let message_type = MessageType::Workout;
669/// let parsed_value = 14;
670/// let scale_fn = match_message_scale(message_type);
671/// let scale = scale_fn(parsed_value);
672/// assert_eq!(scale, Some(100.0));
673/// ```
674pub fn get_field_scale_fn(m: MessageType) -> MatchScaleFn {
675    match m {
676        MessageType::FileId => match_scale_file_id,
677        MessageType::FileCreator => match_scale_file_creator,
678        MessageType::TimestampCorrelation => match_scale_timestamp_correlation,
679        MessageType::Software => match_scale_software,
680        MessageType::SlaveDevice => match_scale_slave_device,
681        MessageType::Capabilities => match_scale_capabilities,
682        MessageType::FileCapabilities => match_scale_file_capabilities,
683        MessageType::MesgCapabilities => match_scale_mesg_capabilities,
684        MessageType::FieldCapabilities => match_scale_field_capabilities,
685        MessageType::DeviceSettings => match_scale_device_settings,
686        MessageType::UserProfile => match_scale_user_profile,
687        MessageType::HrmProfile => match_scale_hrm_profile,
688        MessageType::SdmProfile => match_scale_sdm_profile,
689        MessageType::BikeProfile => match_scale_bike_profile,
690        MessageType::Connectivity => match_scale_connectivity,
691        MessageType::WatchfaceSettings => match_scale_watchface_settings,
692        MessageType::OhrSettings => match_scale_ohr_settings,
693        MessageType::ZonesTarget => match_scale_zones_target,
694        MessageType::Sport => match_scale_sport,
695        MessageType::HrZone => match_scale_hr_zone,
696        MessageType::SpeedZone => match_scale_speed_zone,
697        MessageType::CadenceZone => match_scale_cadence_zone,
698        MessageType::PowerZone => match_scale_power_zone,
699        MessageType::MetZone => match_scale_met_zone,
700        MessageType::DiveSettings => match_scale_dive_settings,
701        MessageType::DiveAlarm => match_scale_dive_alarm,
702        MessageType::DiveGas => match_scale_dive_gas,
703        MessageType::Goal => match_scale_goal,
704        MessageType::Activity => match_scale_activity,
705        MessageType::Session => match_scale_session,
706        MessageType::Lap => match_scale_lap,
707        MessageType::Length => match_scale_length,
708        MessageType::Record => match_scale_record,
709        MessageType::Event => match_scale_event,
710        MessageType::DeviceInfo => match_scale_device_info,
711        MessageType::DeviceAuxBatteryInfo => match_scale_device_aux_battery_info,
712        MessageType::TrainingFile => match_scale_training_file,
713        MessageType::WeatherConditions => match_scale_weather_conditions,
714        MessageType::WeatherAlert => match_scale_weather_alert,
715        MessageType::GpsMetadata => match_scale_gps_metadata,
716        MessageType::CameraEvent => match_scale_camera_event,
717        MessageType::GyroscopeData => match_scale_gyroscope_data,
718        MessageType::AccelerometerData => match_scale_accelerometer_data,
719        MessageType::MagnetometerData => match_scale_magnetometer_data,
720        MessageType::BarometerData => match_scale_barometer_data,
721        MessageType::ThreeDSensorCalibration => match_scale_three_d_sensor_calibration,
722        MessageType::OneDSensorCalibration => match_scale_one_d_sensor_calibration,
723        MessageType::VideoFrame => match_scale_video_frame,
724        MessageType::ObdiiData => match_scale_obdii_data,
725        MessageType::NmeaSentence => match_scale_nmea_sentence,
726        MessageType::AviationAttitude => match_scale_aviation_attitude,
727        MessageType::Video => match_scale_video,
728        MessageType::VideoTitle => match_scale_video_title,
729        MessageType::VideoDescription => match_scale_video_description,
730        MessageType::VideoClip => match_scale_video_clip,
731        MessageType::Set => match_scale_set,
732        MessageType::Jump => match_scale_jump,
733        MessageType::ClimbPro => match_scale_climb_pro,
734        MessageType::FieldDescription => match_scale_field_description,
735        MessageType::DeveloperDataId => match_scale_developer_data_id,
736        MessageType::Course => match_scale_course,
737        MessageType::CoursePoint => match_scale_course_point,
738        MessageType::SegmentId => match_scale_segment_id,
739        MessageType::SegmentLeaderboardEntry => match_scale_segment_leaderboard_entry,
740        MessageType::SegmentPoint => match_scale_segment_point,
741        MessageType::SegmentLap => match_scale_segment_lap,
742        MessageType::SegmentFile => match_scale_segment_file,
743        MessageType::Workout => match_scale_workout,
744        MessageType::WorkoutSession => match_scale_workout_session,
745        MessageType::WorkoutStep => match_scale_workout_step,
746        MessageType::ExerciseTitle => match_scale_exercise_title,
747        MessageType::Schedule => match_scale_schedule,
748        MessageType::Totals => match_scale_totals,
749        MessageType::WeightScale => match_scale_weight_scale,
750        MessageType::BloodPressure => match_scale_blood_pressure,
751        MessageType::MonitoringInfo => match_scale_monitoring_info,
752        MessageType::Monitoring => match_scale_monitoring,
753        MessageType::Hr => match_scale_hr,
754        MessageType::StressLevel => match_scale_stress_level,
755        MessageType::MemoGlob => match_scale_memo_glob,
756        MessageType::AntChannelId => match_scale_ant_channel_id,
757        MessageType::AntRx => match_scale_ant_rx,
758        MessageType::AntTx => match_scale_ant_tx,
759        MessageType::ExdScreenConfiguration => match_scale_exd_screen_configuration,
760        MessageType::ExdDataFieldConfiguration => match_scale_exd_data_field_configuration,
761        MessageType::ExdDataConceptConfiguration => match_scale_exd_data_concept_configuration,
762        MessageType::DiveSummary => match_scale_dive_summary,
763        MessageType::Hrv => match_scale_hrv,
764        _ => match_scale_none,
765    }
766}