I want to setup a voice alarm for armed/disarmed based on telemetry value. Betaflight sends flight mode in smartport T1 sensor in the following way:
So to get armed state I need only the last digit. To get the last digit I need to divide T1 by 10 and take a remainder. If it becomes 4 or more, it's armed, otherwise disarmed. Is it possible in ersky9x?Tmp1 : actual flight mode, sent as 4 digits. Number is sent as (1)1234. Please ignore the leading 1, it is just there to ensure the number as always 5 digits (the 1 + 4 digits of actual data) the numbers are aditives (for example, if first digit after the leading 1 is 6, it means GPS Home and Headfree are both active) :
1 is GPS Hold, 2 is GPS Home, 4 is Headfree
1 is mag enabled, 2 is baro enabled, 4 is sonar enabled
1 is angle, 2 is horizon, 4 is passthrough
1 is ok to arm, 2 is arming is prevented, 4 is armed