1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

Fixed SPort Acc values to display in G

This commit is contained in:
Fredmcc 2016-11-05 14:55:21 +01:00
parent 578bf914f6
commit f959a91be1

View file

@ -703,18 +703,15 @@ void handleSmartPortTelemetry(void)
smartPortHasRequest = 0;
break;
case FSSP_DATAID_ACCX :
smartPortSendPackage(id, accSmooth[X] / 44);
// unknown input and unknown output unit
// we can only show 00.00 format, another digit won't display right on Taranis
// dividing by roughly 44 will give acceleration in G units
smartPortSendPackage(id, 100 * accSmooth[X] / acc.acc_1G); // Multiply by 100 to show as x.xx g on Taranis
smartPortHasRequest = 0;
break;
case FSSP_DATAID_ACCY :
smartPortSendPackage(id, accSmooth[Y] / 44);
smartPortSendPackage(id, 100 * accSmooth[Y] / acc.acc_1G);
smartPortHasRequest = 0;
break;
case FSSP_DATAID_ACCZ :
smartPortSendPackage(id, accSmooth[Z] / 44);
smartPortSendPackage(id, 100 * accSmooth[Z] / acc.acc_1G);
smartPortHasRequest = 0;
break;
case FSSP_DATAID_T1 :