Change current data type from int16 to int32 in order to support currents >32767 mA

This commit is contained in:
Mark Griffin
2009-11-13 22:01:30 +00:00
parent 9a49b0e91d
commit 60e6f95efd
5 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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">
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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 );