[X10] PWM sticks fix
This commit is contained in:
@@ -47,7 +47,7 @@ class ModuleFifo : public Fifo<uint8_t, PXX2_FRAME_MAXLENGTH> {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (uint32_t i=0; i<=len; i++) {
|
||||
for (uint32_t i = 0; i <= len; i++) {
|
||||
frame[i] = fifo[next];
|
||||
next = nextIndex(next);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
bool sticks_pwm_disabled = false;
|
||||
volatile uint32_t pwm_interrupt_count;
|
||||
volatile uint16_t timer_capture_values[NUM_PWMSTICKS];
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
extern bool sticks_pwm_disabled;
|
||||
|
||||
HardwareOptions hardwareOptions;
|
||||
|
||||
void watchdogInit(unsigned int duration)
|
||||
@@ -208,7 +206,7 @@ void boardInit()
|
||||
sticksPwmInit();
|
||||
delay_ms(20);
|
||||
if (pwm_interrupt_count < 32) {
|
||||
sticks_pwm_disabled = true;
|
||||
hardwareOptions.sticksPwmDisabled = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ void processToolsFrame(uint8_t module, uint8_t * frame)
|
||||
}
|
||||
}
|
||||
|
||||
void processPXX2TelemetryFrame(uint8_t module, uint8_t * frame)
|
||||
void processPXX2Frame(uint8_t module, uint8_t *frame)
|
||||
{
|
||||
switch (frame[1]) {
|
||||
case PXX2_TYPE_C_MODULE:
|
||||
|
||||
@@ -92,13 +92,13 @@ void telemetryWakeup()
|
||||
|
||||
#if defined(INTMODULE_USART)
|
||||
while (intmoduleFifo.getFrame(frame)) {
|
||||
processPXX2TelemetryFrame(INTERNAL_MODULE, frame);
|
||||
processPXX2Frame(INTERNAL_MODULE, frame);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(EXTMODULE_USART)
|
||||
while (extmoduleFifo.getFrame(frame)) {
|
||||
processPXX2TelemetryFrame(EXTERNAL_MODULE, frame);
|
||||
processPXX2Frame(EXTERNAL_MODULE, frame);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -196,7 +196,7 @@ extern Fifo<uint8_t, LUA_TELEMETRY_INPUT_FIFO_SIZE> * luaInputTelemetryFifo;
|
||||
#define IS_TELEMETRY_INTERNAL_MODULE() (false)
|
||||
#endif
|
||||
|
||||
void processPXX2TelemetryFrame(uint8_t module, uint8_t * frame);
|
||||
void processPXX2Frame(uint8_t module, uint8_t *frame);
|
||||
void pushPXX2TelemetryPacket(uint8_t module, uint8_t rx_uid, SportTelemetryPacket * packet);
|
||||
|
||||
#endif // _TELEMETRY_H_
|
||||
|
||||
Reference in New Issue
Block a user