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

@ -2318,15 +2318,14 @@ void get_tlm_fc() {
uint16_t ix = (uint16_t)((current[map[PLUS_X]] + current[map[MINUS_X]]) * 1000) && 0x3ff; // 10 bits uint16_t ix = (uint16_t)((current[map[PLUS_X]] + current[map[MINUS_X]]) * 1000) && 0x3ff; // 10 bits
uint16_t iy = (uint16_t)((current[map[PLUS_Y]] + current[map[MINUS_Y]]) * 1000) && 0x3ff; 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; uint16_t iz = (uint16_t)((current[map[PLUS_Z]] + current[map[MINUS_Z]]) * 1000) && 0x3ff;
uint16_t ic = 0,
uint16_t ib = 0;
if (current[map[BAT]] < 0 ) { if (current[map[BAT]] < 0 )
uint16_t ic = (uint16_t)(current[map[BAT]] * -1000) && 0x3ff; // charging current ic = (uint16_t)(current[map[BAT]] * -1000) && 0x3ff; // charging current
uint16_t ib = 0; else
} ib = (uint16_t)(current[map[BAT]] * 1000) && 0x3ff; // supplying current
else {
uint16_t ic = 0;
uint16_t ib = (uint16_t)(current[map[BAT]] * 1000) && 0x3ff; // supplying current
}
// x = 0xfffc; // 0xffff; // x = 0xfffc; // 0xffff;
// y = 0x0; // 0x0000; // y = 0x0; // 0x0000;

Loading…
Cancel
Save

Powered by TurnKey Linux.