update comments on scale factors

This commit is contained in:
Mark Whitehorn 2016-01-20 10:24:58 -07:00 committed by Lorenz Meier
parent ea4937491b
commit 4e4d1a98f6

View File

@ -147,7 +147,7 @@ void sPort_send_data(int uart, uint16_t id, uint32_t data)
}
// TODO: correct scaling
// scaling correct with OpenTX 2.1.7
void sPort_send_BATV(int uart)
{
/* get a local copy of the vehicle status data */
@ -160,7 +160,7 @@ void sPort_send_BATV(int uart)
sPort_send_data(uart, SMARTPORT_ID_VFAS, voltage);
}
// TODO: correct scaling
// TODO: verify scaling
void sPort_send_CUR(int uart)
{
/* get a local copy of the vehicle status data */
@ -169,7 +169,7 @@ void sPort_send_CUR(int uart)
orb_copy(ORB_ID(vehicle_status), vehicle_status_sub, &vehicle_status);
/* send data */
uint32_t current = (int)(255 * vehicle_status.battery_current / 50.0f);
uint32_t current = (int)(100 * vehicle_status.battery_current);
sPort_send_data(uart, SMARTPORT_ID_CURR, current);
}