1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Added 'timer show' command to CLI.

This commit is contained in:
mikeller 2019-08-05 19:39:26 +12:00
parent 025ff572b6
commit 6a0c5836de
16 changed files with 217 additions and 125 deletions

View file

@ -668,7 +668,7 @@ static serialPort_t *openEscSerial(const motorDevConfig_t *motorConfig, escSeria
}
if (mode != PROTOCOL_KISSALL) {
const ioTag_t tag = motorConfig->ioTags[output];
const timerHardware_t *timerHardware = timerGetByTag(tag);
const timerHardware_t *timerHardware = timerAllocate(tag, OWNER_MOTOR);
if (timerHardware == NULL) {
return NULL;
@ -686,7 +686,7 @@ static serialPort_t *openEscSerial(const motorDevConfig_t *motorConfig, escSeria
}
escSerial->mode = mode;
escSerial->txTimerHardware = timerGetByTag(escSerialConfig()->ioTag);
escSerial->txTimerHardware = timerAllocate(escSerialConfig()->ioTag, OWNER_MOTOR);
if (escSerial->txTimerHardware == NULL) {
return NULL;
}
@ -745,7 +745,7 @@ static serialPort_t *openEscSerial(const motorDevConfig_t *motorConfig, escSeria
if (pwmMotors[i].enabled && pwmMotors[i].io != IO_NONE) {
const ioTag_t tag = motorConfig->ioTags[i];
if (tag != IO_TAG_NONE) {
const timerHardware_t *timerHardware = timerGetByTag(tag);
const timerHardware_t *timerHardware = timerAllocate(tag, OWNER_MOTOR);
if (timerHardware) {
escSerialOutputPortConfig(timerHardware);
escOutputs[escSerial->outputCount].io = pwmMotors[i].io;