Also provides a lua function to retrieve module settings
This commit is contained in:
bsongis
2015-05-05 20:02:02 +02:00
parent f4c3610a8c
commit eb6ba88f5a
18 changed files with 109 additions and 57 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ void setupPulsesDSM2(unsigned int port)
}
#endif
dsmDat[1] = g_model.header.modelId; // DSM2 Header second byte for model match
dsmDat[1] = g_model.header.modelId[port]; // DSM2 Header second byte for model match
for (int i=0; i<DSM2_CHANS; i++) {
uint16_t pulse = limit(0, ((channelOutputs[g_model.moduleData[port].channelsStart+i]*13)>>5)+512, 1023);
+2 -2
View File
@@ -338,7 +338,7 @@ void setupPulsesPXX()
PcmBitCount = PcmByte = 0 ;
PcmOnesCount = 0 ;
putPcmHead() ;
putPcmByte( g_model.header.modelId ) ; // putPcmByte( g_model.rxnum ) ; //
putPcmByte(g_model.header.modelId[0]);
uint8_t flag1 = 0;
if (moduleFlag[0] == MODULE_BIND)
flag1 |= (g_eeGeneral.countryCode << 1) | PXX_SEND_BIND;
@@ -554,7 +554,7 @@ void setupPulsesDSM2()
moduleFlag[0] = 0;
}
dsmDat[1] = g_model.header.modelId; // DSM2 Header second byte for model match
dsmDat[1] = g_model.header.modelId[0];
for (uint8_t i=0; i<DSM2_CHANS; i++) {
uint16_t pulse = limit(0, ((channelOutputs[i]*13)>>5)+512, 1023);
+1 -1
View File
@@ -190,7 +190,7 @@ void setupPulsesPXX(unsigned int port)
putPcmHead(port);
/* Rx Number */
putPcmByte(g_model.header.modelId, port);
putPcmByte(g_model.header.modelId[port], port);
/* FLAG1 */
uint8_t flag1 = (g_model.moduleData[port].rfProtocol << 6);