Lesen und prüfen auf ID 26 (27)
local physicalId, primId, dataId, value = sportTelemetryPop()
if physicalId == 0x1A and primId == 0x32 and dataId == 0x0C30 then
Schreiben mit ID 23 (24)
return sportTelemetryPush(0x17, 0x30, 0x0C30, field)
In order to let oXs send less VFAS voltage, you should make a little change in oXs_out_frsky.cpp
instead of
#if defined(ARDUINO_MEASURES_VOLTAGES) && (ARDUINO_MEASURES_VOLTAGES == YES) && ( (VFAS_SOURCE == VOLT_1) || (VFAS_SOURCE == VOLT_2) || (VFAS_SOURCE == VOLT_3) || (VFAS_SOURCE == VOLT_4) || (VFAS_SOURCE == VOLT_5) || (VFAS_SOURCE == VOLT_6) )
if ( (!vfas.available) && ( oXs_Voltage.voltageData.mVolt[VFAS_SOURCE - VOLT_1].available) ){
vfas.value = oXs_Voltage.voltageData.mVolt[VFAS_SOURCE - VOLT_1].value / 10 ; // voltage in mv is divided by 10 because SPORT expect it (volt * 100)
vfas.available = true ;
oXs_Voltage.voltageData.mVolt[VFAS_SOURCE - VOLT_1].available = false ;
}
#elif defined(AN_ADS1115_IS_CONNECTED) && (AN_ADS1115_IS_CONNECTED == YES ) && defined(ADS_MEASURE) && ( (VFAS_SOURCE == ADS_VOLT_1) || (VFAS_SOURCE == ADS_VOLT_2) || (VFAS_SOURCE == ADS_VOLT_3) || (VFAS_SOURCE == ADS_VOLT_4) )
if ( (!vfas.available) && ( ads_Conv[VFAS_SOURCE - ADS_VOLT_1].available) ){
vfas.value = ads_Conv[VFAS_SOURCE - ADS_VOLT_1].value / 10 ; // voltage in mv is divided by 10 because SPORT expect it (volt * 100)
vfas.available = true ;
ads_Conv[VFAS_SOURCE - ADS_VOLT_1].available = false;
}
#else
use (2X 1 line added)
#if defined(ARDUINO_MEASURES_VOLTAGES) && (ARDUINO_MEASURES_VOLTAGES == YES) && ( (VFAS_SOURCE == VOLT_1) || (VFAS_SOURCE == VOLT_2) || (VFAS_SOURCE == VOLT_3) || (VFAS_SOURCE == VOLT_4) || (VFAS_SOURCE == VOLT_5) || (VFAS_SOURCE == VOLT_6) )
if ( (!vfas.available) && ( oXs_Voltage.voltageData.mVolt[VFAS_SOURCE - VOLT_1].available) ){
vfas.value = oXs_Voltage.voltageData.mVolt[VFAS_SOURCE - VOLT_1].value / 10 ; // voltage in mv is divided by 10 because SPORT expect it (volt * 100)
vfas.available = true ;
oXs_Voltage.voltageData.mVolt[VFAS_SOURCE - VOLT_1].available = false ;
}
#elif defined(AN_ADS1115_IS_CONNECTED) && (AN_ADS1115_IS_CONNECTED == YES ) && defined(ADS_MEASURE) && ( (VFAS_SOURCE == ADS_VOLT_1) || (VFAS_SOURCE == ADS_VOLT_2) || (VFAS_SOURCE == ADS_VOLT_3) || (VFAS_SOURCE == ADS_VOLT_4) )
if ( (!vfas.available) && ( ads_Conv[VFAS_SOURCE - ADS_VOLT_1].available) ){
vfas.value = ads_Conv[VFAS_SOURCE - ADS_VOLT_1].value / 10 ; // voltage in mv is divided by 10 because SPORT expect it (volt * 100)
vfas.available = true ;
ads_Conv[VFAS_SOURCE - ADS_VOLT_1].available = false;
}
#else
Then, VFAS will be sent only once every 500 msec (by default)