Fix nv14
This commit is contained in:
@@ -25,6 +25,11 @@
|
||||
#include "intmodule_serial_driver.h"
|
||||
#include "mixer_scheduler.h"
|
||||
|
||||
// solely for 'intmoduleFifo'
|
||||
// TODO: remove this non-sense
|
||||
#include "opentx.h"
|
||||
#include "pulses/pxx2.h"
|
||||
|
||||
afhds2::afhds2() {
|
||||
// TODO Auto-generated constructor stub
|
||||
|
||||
@@ -34,7 +39,7 @@ afhds2::~afhds2() {
|
||||
// TODO Auto-generated destructor stub
|
||||
}
|
||||
|
||||
etx_serial_init afhds2SerialInitParams = {
|
||||
const etx_serial_init afhds2SerialInitParams = {
|
||||
.baudrate = INTMODULE_USART_AFHDS2_BAUDRATE,
|
||||
.parity = ETX_Parity_None,
|
||||
.stop_bits = ETX_StopBits_One,
|
||||
@@ -70,10 +75,14 @@ static void afhds2DeInit(void* context)
|
||||
mixerSchedulerSetPeriod(INTERNAL_MODULE, 0);
|
||||
}
|
||||
|
||||
static void afhds2SetupPulses(void* context)
|
||||
static void afhds2SetupPulses(void* context, int16_t* channels, uint8_t nChannels)
|
||||
{
|
||||
(void)context;
|
||||
|
||||
// TODO:
|
||||
(void)channels;
|
||||
(void)nChannels;
|
||||
|
||||
ModuleSyncStatus& status = getModuleSyncStatus(INTERNAL_MODULE);
|
||||
mixerSchedulerSetPeriod(INTERNAL_MODULE, status.isValid()
|
||||
? status.getAdjustedRefreshRate()
|
||||
@@ -91,7 +100,7 @@ static void afhds2SendPulses(void* context)
|
||||
IntmoduleSerialDriver.sendBuffer(data, size);
|
||||
}
|
||||
|
||||
etx_module_driver_t Afhds2InternalDriver = {
|
||||
const etx_module_driver_t Afhds2InternalDriver = {
|
||||
.protocol = PROTOCOL_CHANNELS_AFHDS2A,
|
||||
.init = afhds2Init,
|
||||
.deinit = afhds2DeInit,
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <list>
|
||||
|
||||
#include "hal/serial_driver.h"
|
||||
#include "hal/module_driver.h"
|
||||
|
||||
#define AFHDS2_PERIOD (2 * 1000) /* us */
|
||||
|
||||
@@ -58,6 +59,7 @@ public:
|
||||
virtual ~afhds2();
|
||||
};
|
||||
|
||||
extern etx_serial_init afhds2SerialInitParams;
|
||||
extern const etx_serial_init afhds2SerialInitParams;
|
||||
extern const etx_module_driver_t Afhds2InternalDriver;
|
||||
|
||||
#endif /* PULSES_AFHDS2_H_ */
|
||||
|
||||
@@ -45,6 +45,10 @@
|
||||
#include "pulses/multi.h"
|
||||
#endif
|
||||
|
||||
#if defined(AFHDS2)
|
||||
#include "pulses/afhds2.h"
|
||||
#endif
|
||||
|
||||
uint8_t s_pulses_paused = 0;
|
||||
ModuleState moduleState[NUM_MODULES];
|
||||
InternalModulePulsesData intmodulePulsesData __DMA;
|
||||
@@ -345,7 +349,7 @@ static void enablePulsesInternalModule(uint8_t protocol)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(AFHDS2)
|
||||
#if defined(INTERNAL_MODULE_AFHDS2A)
|
||||
case PROTOCOL_CHANNELS_AFHDS2A:
|
||||
internalModuleContext = Afhds2InternalDriver.init(INTERNAL_MODULE);
|
||||
internalModuleDriver = &Afhds2InternalDriver;
|
||||
|
||||
Reference in New Issue
Block a user