mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-23 21:36:28 +08:00
Change current data type from int16 to int32 in order to support currents >32767 mA
This commit is contained in:
+2
-2
@@ -226,7 +226,7 @@
|
||||
|
||||
<message name="MOTOR" id="34">
|
||||
<field name="rpm" type="uint16" unit="Hz"/>
|
||||
<field name="current" type="uint16" unit="mA"/>
|
||||
<field name="current" type="int32" unit="mA"/>
|
||||
</message>
|
||||
|
||||
<message name="WP_MOVED" id="35">
|
||||
@@ -420,7 +420,7 @@
|
||||
<field name="rc_status" type="uint8" values="OK|LOST|REALLY_LOST"/>
|
||||
<field name="mode" type="uint8" values="MANUAL|AUTO|FAILSAFE"/>
|
||||
<field name="vsupply" type="uint8" unit="decivolt"/>
|
||||
<field name="current" type="int16" unit="mA"/>
|
||||
<field name="current" type="int32" unit="mA"/>
|
||||
</message>
|
||||
|
||||
<message name="ADC" id="104">
|
||||
|
||||
@@ -56,7 +56,7 @@ struct fbw_state {
|
||||
uint8_t status;
|
||||
uint8_t nb_err;
|
||||
uint8_t vsupply; /* 1e-1 V */
|
||||
int16_t current; /* milliAmps */
|
||||
int32_t current; /* milliAmps */
|
||||
};
|
||||
|
||||
struct ap_state {
|
||||
|
||||
@@ -190,7 +190,7 @@ float slider_1_val, slider_2_val;
|
||||
bool_t launch = FALSE;
|
||||
|
||||
uint8_t vsupply; // deciVolt
|
||||
static int16_t current; // milliAmpere
|
||||
static int32_t current; // milliAmpere
|
||||
|
||||
float energy; // Fuel consumption (mAh)
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ struct adc_buf current_adc_buf;
|
||||
#endif
|
||||
|
||||
uint8_t fbw_vsupply_decivolt;
|
||||
int16_t fbw_current_milliamp;
|
||||
int32_t fbw_current_milliamp;
|
||||
|
||||
uint8_t fbw_mode;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
extern uint8_t fbw_mode;
|
||||
extern uint8_t fbw_vsupply_decivolt;
|
||||
extern int16_t fbw_current_milliamp;
|
||||
extern int32_t fbw_current_milliamp;
|
||||
extern bool_t failsafe_mode;
|
||||
|
||||
void init_fbw( void );
|
||||
|
||||
Reference in New Issue
Block a user