Update main.c fix currents

fc-jy
Alan Johnston 11 months ago committed by GitHub
parent cab80e13a1
commit 7ca536fbe5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2319,14 +2319,13 @@ void get_tlm_fc() {
uint16_t iy = (uint16_t)((current[map[PLUS_Y]] + current[map[MINUS_Y]]) * 1000) && 0x3ff;
uint16_t iz = (uint16_t)((current[map[PLUS_Z]] + current[map[MINUS_Z]]) * 1000) && 0x3ff;
if (current[map[BAT]] < 0 ) {
uint16_t ic = (uint16_t)(current[map[BAT]] * -1000) && 0x3ff; // charging current
uint16_t ib = 0;
}
else {
uint16_t ic = 0;
uint16_t ib = (uint16_t)(current[map[BAT]] * 1000) && 0x3ff; // supplying current
}
uint16_t ic = 0,
uint16_t ib = 0;
if (current[map[BAT]] < 0 )
ic = (uint16_t)(current[map[BAT]] * -1000) && 0x3ff; // charging current
else
ib = (uint16_t)(current[map[BAT]] * 1000) && 0x3ff; // supplying current
// x = 0xfffc; // 0xffff;
// y = 0x0; // 0x0000;

Loading…
Cancel
Save

Powered by TurnKey Linux.