DSM2 pulses throws adjusted
This commit is contained in:
@@ -387,11 +387,6 @@ int16_t applyLimits(uint8_t channel, int32_t value)
|
||||
if (safetyCh[channel] != -128) // if safety channel available for channel check
|
||||
ofs = calc100toRESX(safetyCh[channel]);
|
||||
|
||||
#ifdef DSM2
|
||||
if (g_model.protocol == PROTO_DSM2)
|
||||
ofs = (ofs * 13) / 32;
|
||||
#endif
|
||||
|
||||
return ofs;
|
||||
}
|
||||
|
||||
|
||||
@@ -519,6 +519,7 @@ void setupPulsesDsm2()
|
||||
for (uint8_t i=0; i<DSM2_CHANS; i++)
|
||||
{
|
||||
uint16_t pulse = limit(0, (g_chans512[i]>>1)+512, 1023);
|
||||
pulse = (pulse * 13) / 32;
|
||||
dsmDat[2+2*i] = (i<<2) | ((pulse>>8)&0x03);
|
||||
dsmDat[3+2*i] = pulse & 0xff;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user