@@ -204,6 +204,7 @@ int32_t confgenerator_serialize_appconf(uint8_t *buffer, const app_configuration
204
204
buffer [ind ++ ] = conf -> can_mode ;
205
205
buffer [ind ++ ] = (uint8_t )conf -> uavcan_esc_index ;
206
206
buffer [ind ++ ] = conf -> uavcan_raw_mode ;
207
+ buffer_append_float32_auto (buffer , conf -> uavcan_raw_rpm_max , & ind );
207
208
buffer [ind ++ ] = conf -> servo_out_enable ;
208
209
buffer [ind ++ ] = conf -> kill_sw_mode ;
209
210
buffer [ind ++ ] = conf -> app_to_use ;
@@ -223,7 +224,7 @@ int32_t confgenerator_serialize_appconf(uint8_t *buffer, const app_configuration
223
224
buffer [ind ++ ] = conf -> app_ppm_conf .multi_esc ;
224
225
buffer [ind ++ ] = conf -> app_ppm_conf .tc ;
225
226
buffer_append_float32_auto (buffer , conf -> app_ppm_conf .tc_max_diff , & ind );
226
- buffer_append_float32_auto (buffer , conf -> app_ppm_conf .max_erpm_for_dir , & ind );
227
+ buffer_append_float16 (buffer , conf -> app_ppm_conf .max_erpm_for_dir , 1 , & ind );
227
228
buffer_append_float32_auto (buffer , conf -> app_ppm_conf .smart_rev_max_duty , & ind );
228
229
buffer_append_float32_auto (buffer , conf -> app_ppm_conf .smart_rev_ramp_time , & ind );
229
230
buffer [ind ++ ] = conf -> app_adc_conf .ctrl_type ;
@@ -574,6 +575,7 @@ bool confgenerator_deserialize_appconf(const uint8_t *buffer, app_configuration
574
575
conf -> can_mode = buffer [ind ++ ];
575
576
conf -> uavcan_esc_index = buffer [ind ++ ];
576
577
conf -> uavcan_raw_mode = buffer [ind ++ ];
578
+ conf -> uavcan_raw_rpm_max = buffer_get_float32_auto (buffer , & ind );
577
579
conf -> servo_out_enable = buffer [ind ++ ];
578
580
conf -> kill_sw_mode = buffer [ind ++ ];
579
581
conf -> app_to_use = buffer [ind ++ ];
@@ -593,7 +595,7 @@ bool confgenerator_deserialize_appconf(const uint8_t *buffer, app_configuration
593
595
conf -> app_ppm_conf .multi_esc = buffer [ind ++ ];
594
596
conf -> app_ppm_conf .tc = buffer [ind ++ ];
595
597
conf -> app_ppm_conf .tc_max_diff = buffer_get_float32_auto (buffer , & ind );
596
- conf -> app_ppm_conf .max_erpm_for_dir = buffer_get_float32_auto (buffer , & ind );
598
+ conf -> app_ppm_conf .max_erpm_for_dir = buffer_get_float16 (buffer , 1 , & ind );
597
599
conf -> app_ppm_conf .smart_rev_max_duty = buffer_get_float32_auto (buffer , & ind );
598
600
conf -> app_ppm_conf .smart_rev_ramp_time = buffer_get_float32_auto (buffer , & ind );
599
601
conf -> app_adc_conf .ctrl_type = buffer [ind ++ ];
@@ -928,6 +930,7 @@ void confgenerator_set_defaults_appconf(app_configuration *conf) {
928
930
conf -> can_mode = APPCONF_CAN_MODE ;
929
931
conf -> uavcan_esc_index = APPCONF_UAVCAN_ESC_INDEX ;
930
932
conf -> uavcan_raw_mode = APPCONF_UAVCAN_RAW_MODE ;
933
+ conf -> uavcan_raw_rpm_max = APPCONF_UAVCAN_RAW_RPM_MAX ;
931
934
conf -> servo_out_enable = APPCONF_SERVO_OUT_ENABLE ;
932
935
conf -> kill_sw_mode = APPCONF_KILL_SW_MODE ;
933
936
conf -> app_to_use = APPCONF_APP_TO_USE ;
0 commit comments