mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 06:45:16 +03:00
cleanup and style cosmetics
This commit is contained in:
parent
8c8c9f5e7a
commit
544cad10df
2 changed files with 110 additions and 155 deletions
|
@ -298,40 +298,34 @@ static void cliPrintLinef(const char *format, ...)
|
||||||
va_end(va);
|
va_end(va);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void printValuePointer(const clivalue_t *var, const void *valuePointer, bool full)
|
static void printValuePointer(const clivalue_t *var, const void *valuePointer, bool full)
|
||||||
{
|
{
|
||||||
if ((var->type & VALUE_MODE_MASK) == MODE_ARRAY) {
|
if ((var->type & VALUE_MODE_MASK) == MODE_ARRAY) {
|
||||||
for (int i = 0; i < var->config.array.length; i++) {
|
for (int i = 0; i < var->config.array.length; i++) {
|
||||||
switch (var->type & VALUE_TYPE_MASK) {
|
switch (var->type & VALUE_TYPE_MASK) {
|
||||||
default:
|
default:
|
||||||
case(VAR_UINT8): {
|
case VAR_UINT8:
|
||||||
// fetch data
|
// uint8_t array
|
||||||
uint8_t value = ((uint8_t *)valuePointer)[i];
|
cliPrintf("%d", ((uint8_t *)valuePointer)[i]);
|
||||||
cliPrintf("%d", value);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case(VAR_INT8): {
|
case VAR_INT8:
|
||||||
// fetch data
|
// int8_t array
|
||||||
int8_t value = ((int8_t *)valuePointer)[i];
|
cliPrintf("%d", ((int8_t *)valuePointer)[i]);
|
||||||
cliPrintf("%d", value);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case(VAR_UINT16): {
|
case VAR_UINT16:
|
||||||
// fetch data
|
// uin16_t array
|
||||||
uint16_t value = ((uint16_t *)valuePointer)[i];
|
cliPrintf("%d", ((uint16_t *)valuePointer)[i]);
|
||||||
cliPrintf("%d", value);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case(VAR_INT16): {
|
case VAR_INT16:
|
||||||
// fetch data
|
// int16_t array
|
||||||
int16_t value = ((int16_t *)valuePointer)[i];
|
cliPrintf("%d", ((int16_t *)valuePointer)[i]);
|
||||||
cliPrintf("%d", value);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i < var->config.array.length - 1) {
|
if (i < var->config.array.length - 1) {
|
||||||
cliPrint(",");
|
cliPrint(",");
|
||||||
}
|
}
|
||||||
|
@ -2773,7 +2767,7 @@ STATIC_UNIT_TESTED void cliSet(char *cmdline)
|
||||||
// it stops at the first character that cannot be converted...
|
// it stops at the first character that cannot be converted...
|
||||||
switch (val->type & VALUE_TYPE_MASK) {
|
switch (val->type & VALUE_TYPE_MASK) {
|
||||||
default:
|
default:
|
||||||
case(VAR_UINT8): {
|
case VAR_UINT8: {
|
||||||
// fetch data pointer
|
// fetch data pointer
|
||||||
uint8_t *data = (uint8_t *)getValuePointer(val) + i;
|
uint8_t *data = (uint8_t *)getValuePointer(val) + i;
|
||||||
// store value
|
// store value
|
||||||
|
@ -2781,7 +2775,7 @@ STATIC_UNIT_TESTED void cliSet(char *cmdline)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case(VAR_INT8): {
|
case VAR_INT8: {
|
||||||
// fetch data pointer
|
// fetch data pointer
|
||||||
int8_t *data = (int8_t *)getValuePointer(val) + i;
|
int8_t *data = (int8_t *)getValuePointer(val) + i;
|
||||||
// store value
|
// store value
|
||||||
|
@ -2789,7 +2783,7 @@ STATIC_UNIT_TESTED void cliSet(char *cmdline)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case(VAR_UINT16): {
|
case VAR_UINT16: {
|
||||||
// fetch data pointer
|
// fetch data pointer
|
||||||
uint16_t *data = (uint16_t *)getValuePointer(val) + i;
|
uint16_t *data = (uint16_t *)getValuePointer(val) + i;
|
||||||
// store value
|
// store value
|
||||||
|
@ -2797,7 +2791,7 @@ STATIC_UNIT_TESTED void cliSet(char *cmdline)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case(VAR_INT16): {
|
case VAR_INT16: {
|
||||||
// fetch data pointer
|
// fetch data pointer
|
||||||
int16_t *data = (int16_t *)getValuePointer(val) + i;
|
int16_t *data = (int16_t *)getValuePointer(val) + i;
|
||||||
// store value
|
// store value
|
||||||
|
|
|
@ -61,23 +61,23 @@ extern "C" {
|
||||||
const lookupTableEntry_t lookupTables[] = {};
|
const lookupTableEntry_t lookupTables[] = {};
|
||||||
|
|
||||||
|
|
||||||
PG_REGISTER_WITH_RESET_FN(osdConfig_t, osdConfig, PG_OSD_CONFIG, 0);
|
PG_REGISTER(osdConfig_t, osdConfig, PG_OSD_CONFIG, 0);
|
||||||
PG_REGISTER(batteryConfig_t, batteryConfig, PG_BATTERY_CONFIG, 0);
|
PG_REGISTER(batteryConfig_t, batteryConfig, PG_BATTERY_CONFIG, 0);
|
||||||
PG_REGISTER_WITH_RESET_FN(ledStripConfig_t, ledStripConfig, PG_LED_STRIP_CONFIG, 0);
|
PG_REGISTER(ledStripConfig_t, ledStripConfig, PG_LED_STRIP_CONFIG, 0);
|
||||||
PG_REGISTER_WITH_RESET_TEMPLATE(systemConfig_t, systemConfig, PG_SYSTEM_CONFIG, 0);
|
PG_REGISTER(systemConfig_t, systemConfig, PG_SYSTEM_CONFIG, 0);
|
||||||
PG_REGISTER_ARRAY(adjustmentRange_t, MAX_ADJUSTMENT_RANGE_COUNT, adjustmentRanges, PG_ADJUSTMENT_RANGE_CONFIG, 0);
|
PG_REGISTER_ARRAY(adjustmentRange_t, MAX_ADJUSTMENT_RANGE_COUNT, adjustmentRanges, PG_ADJUSTMENT_RANGE_CONFIG, 0);
|
||||||
PG_REGISTER_ARRAY(modeActivationCondition_t, MAX_MODE_ACTIVATION_CONDITION_COUNT, modeActivationConditions, PG_MODE_ACTIVATION_PROFILE, 0);
|
PG_REGISTER_ARRAY(modeActivationCondition_t, MAX_MODE_ACTIVATION_CONDITION_COUNT, modeActivationConditions, PG_MODE_ACTIVATION_PROFILE, 0);
|
||||||
PG_REGISTER_WITH_RESET_TEMPLATE(mixerConfig_t, mixerConfig, PG_MIXER_CONFIG, 0);
|
PG_REGISTER(mixerConfig_t, mixerConfig, PG_MIXER_CONFIG, 0);
|
||||||
PG_REGISTER_ARRAY(motorMixer_t, MAX_SUPPORTED_MOTORS, customMotorMixer, PG_MOTOR_MIXER, 0);
|
PG_REGISTER_ARRAY(motorMixer_t, MAX_SUPPORTED_MOTORS, customMotorMixer, PG_MOTOR_MIXER, 0);
|
||||||
PG_REGISTER_ARRAY_WITH_RESET_FN(servoParam_t, MAX_SUPPORTED_SERVOS, servoParams, PG_SERVO_PARAMS, 0);
|
PG_REGISTER_ARRAY(servoParam_t, MAX_SUPPORTED_SERVOS, servoParams, PG_SERVO_PARAMS, 0);
|
||||||
PG_REGISTER_ARRAY(servoMixer_t, MAX_SERVO_RULES, customServoMixers, PG_SERVO_MIXER, 0);
|
PG_REGISTER_ARRAY(servoMixer_t, MAX_SERVO_RULES, customServoMixers, PG_SERVO_MIXER, 0);
|
||||||
PG_REGISTER_WITH_RESET_TEMPLATE(featureConfig_t, featureConfig, PG_FEATURE_CONFIG, 0);
|
PG_REGISTER(featureConfig_t, featureConfig, PG_FEATURE_CONFIG, 0);
|
||||||
PG_REGISTER(beeperConfig_t, beeperConfig, PG_BEEPER_CONFIG, 0);
|
PG_REGISTER(beeperConfig_t, beeperConfig, PG_BEEPER_CONFIG, 0);
|
||||||
PG_REGISTER_WITH_RESET_FN(rxConfig_t, rxConfig, PG_RX_CONFIG, 0);
|
PG_REGISTER(rxConfig_t, rxConfig, PG_RX_CONFIG, 0);
|
||||||
PG_REGISTER_WITH_RESET_FN(serialConfig_t, serialConfig, PG_SERIAL_CONFIG, 0);
|
PG_REGISTER(serialConfig_t, serialConfig, PG_SERIAL_CONFIG, 0);
|
||||||
PG_REGISTER_ARRAY_WITH_RESET_FN(rxChannelRangeConfig_t, NON_AUX_CHANNEL_COUNT, rxChannelRangeConfigs, PG_RX_CHANNEL_RANGE_CONFIG, 0);
|
PG_REGISTER_ARRAY(rxChannelRangeConfig_t, NON_AUX_CHANNEL_COUNT, rxChannelRangeConfigs, PG_RX_CHANNEL_RANGE_CONFIG, 0);
|
||||||
PG_REGISTER_ARRAY_WITH_RESET_FN(rxFailsafeChannelConfig_t, MAX_SUPPORTED_RC_CHANNEL_COUNT, rxFailsafeChannelConfigs, PG_RX_FAILSAFE_CHANNEL_CONFIG, 0);
|
PG_REGISTER_ARRAY(rxFailsafeChannelConfig_t, MAX_SUPPORTED_RC_CHANNEL_COUNT, rxFailsafeChannelConfigs, PG_RX_FAILSAFE_CHANNEL_CONFIG, 0);
|
||||||
PG_REGISTER_WITH_RESET_TEMPLATE(pidConfig_t, pidConfig, PG_PID_CONFIG, 0);
|
PG_REGISTER(pidConfig_t, pidConfig, PG_PID_CONFIG, 0);
|
||||||
|
|
||||||
PG_REGISTER_WITH_RESET_FN(int8_t, unitTestData, PG_RESERVED_FOR_TESTING_1, 0);
|
PG_REGISTER_WITH_RESET_FN(int8_t, unitTestData, PG_RESERVED_FOR_TESTING_1, 0);
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ uint8_t getMotorCount() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void setPrintfSerialPort(struct serialPort_s *serialPort) { UNUSED(serialPort); }
|
void setPrintfSerialPort(struct serialPort_s) {}
|
||||||
|
|
||||||
void tfp_printf(const char * expectedFormat, ...) {
|
void tfp_printf(const char * expectedFormat, ...) {
|
||||||
va_list args;
|
va_list args;
|
||||||
|
@ -156,31 +156,13 @@ void tfp_printf(const char * expectedFormat, ...) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void tfp_format(void *putp, void (*putf) (void *, char), const char * expectedFormat, va_list va) {
|
void tfp_format(void *, void (*) (void *, char), const char * expectedFormat, va_list va) {
|
||||||
UNUSED(putp);
|
|
||||||
UNUSED(putf);
|
|
||||||
vprintf(expectedFormat, va);
|
vprintf(expectedFormat, va);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const box_t boxes[] = { { 0, "DUMMYBOX", 0 } };
|
||||||
|
const box_t *findBoxByPermanentId(uint8_t) { return &boxes[0]; }
|
||||||
static const box_t boxes[] = {
|
const box_t *findBoxByBoxId(boxId_e) { return &boxes[0]; }
|
||||||
{ 0, "DUMMYBOX", 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
const box_t *findBoxByPermanentId(uint8_t permanentId) {
|
|
||||||
UNUSED(permanentId);
|
|
||||||
return &boxes[0];
|
|
||||||
}
|
|
||||||
const box_t *findBoxByBoxId(boxId_e boxId) {
|
|
||||||
UNUSED(boxId);
|
|
||||||
return &boxes[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
const pidConfig_t pgResetTemplate_pidConfig = { 0 };
|
|
||||||
const systemConfig_t pgResetTemplate_systemConfig = { .debug_mode = 0,0};
|
|
||||||
const mixerConfig_t pgResetTemplate_mixerConfig = { 0, false };
|
|
||||||
const featureConfig_t pgResetTemplate_featureConfig = { 0 };
|
|
||||||
|
|
||||||
int8_t unitTestDataArray[3];
|
int8_t unitTestDataArray[3];
|
||||||
|
|
||||||
|
@ -188,67 +170,53 @@ void pgResetFn_unitTestData(int8_t *ptr) {
|
||||||
ptr = &unitTestDataArray[0];
|
ptr = &unitTestDataArray[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
void pgResetFn_osdConfig(osdConfig_t *config) { UNUSED(config); }
|
|
||||||
void pgResetFn_rxConfig(rxConfig_t *config) { UNUSED(config); }
|
|
||||||
void pgResetFn_serialConfig(serialConfig_t *config) { UNUSED(config); }
|
|
||||||
void pgResetFn_rxChannelRangeConfigs(rxChannelRangeConfig_t *config) { UNUSED(config); }
|
|
||||||
void pgResetFn_rxFailsafeChannelConfigs(rxFailsafeChannelConfig_t *config) { UNUSED(config); }
|
|
||||||
|
|
||||||
|
|
||||||
void pgResetFn_ledStripConfig(ledStripConfig_t *ledStripConfig) { UNUSED(ledStripConfig); }
|
|
||||||
void pgResetFn_mixerConfig(mixerConfig_t *mixerConfig) { UNUSED(mixerConfig); }
|
|
||||||
void pgResetFn_servoParams(servoParam_t *servoParams) { UNUSED(servoParams); }
|
|
||||||
|
|
||||||
|
|
||||||
uint32_t getBeeperOffMask(void) { return 0; }
|
uint32_t getBeeperOffMask(void) { return 0; }
|
||||||
uint32_t getPreferredBeeperOffMask(void) { return 0; }
|
uint32_t getPreferredBeeperOffMask(void) { return 0; }
|
||||||
|
|
||||||
void beeper(beeperMode_e mode) {UNUSED(mode);}
|
void beeper(beeperMode_e) {}
|
||||||
void beeperSilence(void) {}
|
void beeperSilence(void) {}
|
||||||
void beeperConfirmationBeeps(uint8_t beepCount) {UNUSED(beepCount);}
|
void beeperConfirmationBeeps(uint8_t) {}
|
||||||
void beeperWarningBeeps(uint8_t beepCount) {UNUSED(beepCount);}
|
void beeperWarningBeeps(uint8_t) {}
|
||||||
void beeperUpdate(timeUs_t currentTimeUs) {UNUSED(currentTimeUs);}
|
void beeperUpdate(timeUs_t) {}
|
||||||
uint32_t getArmingBeepTimeMicros(void) {return 0;}
|
uint32_t getArmingBeepTimeMicros(void) {return 0;}
|
||||||
beeperMode_e beeperModeForTableIndex(int idx) {UNUSED(idx); return BEEPER_SILENCE;}
|
beeperMode_e beeperModeForTableIndex(int) {return BEEPER_SILENCE;}
|
||||||
const char *beeperNameForTableIndex(int idx) {UNUSED(idx); return NULL;}
|
const char *beeperNameForTableIndex(int) {return NULL;}
|
||||||
int beeperTableEntryCount(void) {return 0;}
|
int beeperTableEntryCount(void) {return 0;}
|
||||||
bool isBeeperOn(void) {return false;}
|
bool isBeeperOn(void) {return false;}
|
||||||
void beeperOffSetAll(uint8_t beeperCount) { UNUSED(beeperCount); }
|
void beeperOffSetAll(uint8_t) {}
|
||||||
void setBeeperOffMask(uint32_t mask) { UNUSED(mask);}
|
void setBeeperOffMask(uint32_t) {}
|
||||||
void setPreferredBeeperOffMask(uint32_t mask) { UNUSED(mask);}
|
void setPreferredBeeperOffMask(uint32_t) {}
|
||||||
|
|
||||||
void beeperOffSet(uint32_t mask) { UNUSED(mask); }
|
void beeperOffSet(uint32_t) {}
|
||||||
void beeperOffClear(uint32_t mask) {UNUSED(mask); }
|
void beeperOffClear(uint32_t) {}
|
||||||
void beeperOffClearAll(void) {}
|
void beeperOffClearAll(void) {}
|
||||||
bool parseColor(int index, const char *colorConfig) { UNUSED(index); UNUSED(colorConfig); return false; }
|
bool parseColor(int, const char *) {return false; }
|
||||||
void resetEEPROM(void) {}
|
void resetEEPROM(void) {}
|
||||||
void bufWriterFlush(bufWriter_t *b) { UNUSED(b); }
|
void bufWriterFlush(bufWriter_t *) {}
|
||||||
void mixerResetDisarmedMotors(void) {}
|
void mixerResetDisarmedMotors(void) {}
|
||||||
void gpsEnablePassthrough(struct serialPort_s *gpsPassthroughPort) { UNUSED(gpsPassthroughPort); }
|
void gpsEnablePassthrough(struct serialPort_s *) {}
|
||||||
bool parseLedStripConfig(int ledIndex, const char *config){ UNUSED(ledIndex); UNUSED(config); return false; }
|
bool parseLedStripConfig(int, const char *){return false; }
|
||||||
const char rcChannelLetters[] = "AERT12345678abcdefgh";
|
const char rcChannelLetters[] = "AERT12345678abcdefgh";
|
||||||
void parseRcChannels(const char *input, rxConfig_t *rxConfig){ UNUSED(input), UNUSED(rxConfig); }
|
|
||||||
void mixerLoadMix(int index, motorMixer_t *customMixers) { UNUSED(index); UNUSED(customMixers); }
|
void parseRcChannels(const char *, rxConfig_t *){}
|
||||||
bool setModeColor(ledModeIndex_e modeIndex, int modeColorIndex, int colorIndex) { UNUSED(modeIndex); UNUSED(modeColorIndex); UNUSED(colorIndex); return false; }
|
void mixerLoadMix(int, motorMixer_t *) {}
|
||||||
float convertExternalToMotor(uint16_t externalValue){ UNUSED(externalValue); return 1.0; }
|
bool setModeColor(ledModeIndex_e, int, int) { return false; }
|
||||||
|
float convertExternalToMotor(uint16_t ){ return 1.0; }
|
||||||
uint8_t getCurrentPidProfileIndex(void){ return 1; }
|
uint8_t getCurrentPidProfileIndex(void){ return 1; }
|
||||||
uint8_t getCurrentControlRateProfileIndex(void){ return 1; }
|
uint8_t getCurrentControlRateProfileIndex(void){ return 1; }
|
||||||
void changeControlRateProfile(uint8_t controlRateProfileIndex) {UNUSED(controlRateProfileIndex);}
|
void changeControlRateProfile(uint8_t) {}
|
||||||
void resetAllRxChannelRangeConfigurations(rxChannelRangeConfig_t *rxChannelRangeConfig) { UNUSED(rxChannelRangeConfig); }
|
void resetAllRxChannelRangeConfigurations(rxChannelRangeConfig_t *) {}
|
||||||
void writeEEPROM() {}
|
void writeEEPROM() {}
|
||||||
serialPortConfig_t *serialFindPortConfiguration(serialPortIdentifier_e identifier) { UNUSED(identifier); return NULL; }
|
serialPortConfig_t *serialFindPortConfiguration(serialPortIdentifier_e) {return NULL; }
|
||||||
baudRate_e lookupBaudRateIndex(uint32_t baudRate){ UNUSED(baudRate); return BAUD_9600; }
|
baudRate_e lookupBaudRateIndex(uint32_t){return BAUD_9600; }
|
||||||
serialPortUsage_t *findSerialPortUsageByIdentifier(serialPortIdentifier_e identifier){ UNUSED(identifier); return NULL; }
|
serialPortUsage_t *findSerialPortUsageByIdentifier(serialPortIdentifier_e){ return NULL; }
|
||||||
serialPort_t *openSerialPort(serialPortIdentifier_e identifier, serialPortFunction_e function, serialReceiveCallbackPtr rxCallback, uint32_t baudrate, portMode_t mode, portOptions_t options) {
|
serialPort_t *openSerialPort(serialPortIdentifier_e, serialPortFunction_e, serialReceiveCallbackPtr, uint32_t, portMode_t, portOptions_t) { return NULL; }
|
||||||
UNUSED(identifier); UNUSED(function); UNUSED(rxCallback); UNUSED(baudrate); UNUSED(mode); UNUSED(options);
|
void serialSetBaudRate(serialPort_t *, uint32_t) {}
|
||||||
return NULL;
|
void serialSetMode(serialPort_t *, portMode_t) {}
|
||||||
}
|
void serialPassthrough(serialPort_t *, serialPort_t *, serialConsumer *, serialConsumer *) {}
|
||||||
void serialSetBaudRate(serialPort_t *instance, uint32_t baudRate) { UNUSED(instance); UNUSED(baudRate); }
|
|
||||||
void serialSetMode(serialPort_t *instance, portMode_t mode) { UNUSED(instance); UNUSED(mode); }
|
|
||||||
void serialPassthrough(serialPort_t *left, serialPort_t *right, serialConsumer *leftC, serialConsumer *rightC) { UNUSED(left); UNUSED(right); UNUSED(leftC); UNUSED(rightC); }
|
|
||||||
uint32_t millis(void) { return 0; }
|
uint32_t millis(void) { return 0; }
|
||||||
uint8_t getBatteryCellCount(void) { return 1; }
|
uint8_t getBatteryCellCount(void) { return 1; }
|
||||||
void servoMixerLoadMix(int index) { UNUSED(index); }
|
void servoMixerLoadMix(int) {}
|
||||||
const char * getBatteryStateString(void){ return "_getBatteryStateString_"; }
|
const char * getBatteryStateString(void){ return "_getBatteryStateString_"; }
|
||||||
|
|
||||||
uint32_t stackTotalSize(void) { return 0x4000; }
|
uint32_t stackTotalSize(void) { return 0x4000; }
|
||||||
|
@ -259,48 +227,41 @@ uint8_t __config_start = 0x00;
|
||||||
uint8_t __config_end = 0x10;
|
uint8_t __config_end = 0x10;
|
||||||
uint16_t averageSystemLoadPercent = 0;
|
uint16_t averageSystemLoadPercent = 0;
|
||||||
|
|
||||||
timeDelta_t getTaskDeltaTime(cfTaskId_e taskId){ UNUSED(taskId); return 0; }
|
timeDelta_t getTaskDeltaTime(cfTaskId_e){ return 0; }
|
||||||
armingDisableFlags_e getArmingDisableFlags(void) { return ARMING_DISABLED_NO_GYRO; }
|
armingDisableFlags_e getArmingDisableFlags(void) { return ARMING_DISABLED_NO_GYRO; }
|
||||||
|
|
||||||
const char *armingDisableFlagNames[]= {
|
const char *armingDisableFlagNames[]= {
|
||||||
"DUMMYDISABLEFLAGNAME"
|
"DUMMYDISABLEFLAGNAME"
|
||||||
};
|
};
|
||||||
|
|
||||||
void getTaskInfo(cfTaskId_e taskId, cfTaskInfo_t *taskInfo){ UNUSED(taskId); UNUSED(taskInfo); }
|
void getTaskInfo(cfTaskId_e, cfTaskInfo_t *) {}
|
||||||
void getCheckFuncInfo(cfCheckFuncInfo_t *checkFuncInfo){ UNUSED(checkFuncInfo); }
|
void getCheckFuncInfo(cfCheckFuncInfo_t *) {}
|
||||||
|
|
||||||
const char * const targetName = "UNITTEST";
|
const char * const targetName = "UNITTEST";
|
||||||
const char* const buildDate = "Jan 01 2017";
|
const char* const buildDate = "Jan 01 2017";
|
||||||
const char * const buildTime = "00:00:00";
|
const char * const buildTime = "00:00:00";
|
||||||
const char * const shortGitRevision = "MASTER";
|
const char * const shortGitRevision = "MASTER";
|
||||||
|
|
||||||
uint32_t serialRxBytesWaiting(const serialPort_t *instance) { UNUSED(instance); return 0;}
|
uint32_t serialRxBytesWaiting(const serialPort_t *) {return 0;}
|
||||||
uint8_t serialRead(serialPort_t *instance){ UNUSED(instance); return 0;}
|
uint8_t serialRead(serialPort_t *){return 0;}
|
||||||
|
|
||||||
void bufWriterAppend(bufWriter_t *b, uint8_t ch){ UNUSED(b); printf("%c", ch); }
|
void bufWriterAppend(bufWriter_t *, uint8_t ch){ printf("%c", ch); }
|
||||||
//void setPrintfSerialPort(struct serialPort_s *serialPort){ UNUSED(serialPort); }
|
void serialWriteBufShim(void *, const uint8_t *, int) {}
|
||||||
void serialWriteBufShim(void *instance, const uint8_t *data, int count){ UNUSED(instance); UNUSED(data); UNUSED(count); }
|
bufWriter_t *bufWriterInit(uint8_t *, int, bufWrite_t, void *) {return NULL;}
|
||||||
bufWriter_t *bufWriterInit(uint8_t *b, int total_size, bufWrite_t writer, void *p) { UNUSED(b); UNUSED(total_size); UNUSED(writer); UNUSED(p); return NULL; }
|
void schedulerSetCalulateTaskStatistics(bool) {}
|
||||||
void schedulerSetCalulateTaskStatistics(bool calculateTaskStatistics) { UNUSED(calculateTaskStatistics); }
|
void setArmingDisabled(armingDisableFlags_e) {}
|
||||||
void setArmingDisabled(armingDisableFlags_e flag) { UNUSED(flag); }
|
|
||||||
|
|
||||||
|
void waitForSerialPortToFinishTransmitting(serialPort_t *) {}
|
||||||
void waitForSerialPortToFinishTransmitting(serialPort_t *serialPort) { UNUSED(serialPort); }
|
|
||||||
void stopPwmAllMotors(void) {}
|
void stopPwmAllMotors(void) {}
|
||||||
void systemResetToBootloader(void) {}
|
void systemResetToBootloader(void) {}
|
||||||
void resetConfigs(void) {}
|
void resetConfigs(void) {}
|
||||||
void systemReset(void) {}
|
void systemReset(void) {}
|
||||||
|
|
||||||
void changePidProfile(uint8_t pidProfileIndex) { UNUSED(pidProfileIndex); }
|
void changePidProfile(uint8_t) {}
|
||||||
bool serialIsPortAvailable(serialPortIdentifier_e identifier) { UNUSED(identifier); return false; }
|
bool serialIsPortAvailable(serialPortIdentifier_e) { return false; }
|
||||||
void generateLedConfig(ledConfig_t *ledConfig, char *ledConfigBuffer, size_t bufferSize){ UNUSED(ledConfig); UNUSED(ledConfigBuffer); UNUSED(bufferSize); }
|
void generateLedConfig(ledConfig_t *, char *, size_t) {}
|
||||||
|
bool isSerialTransmitBufferEmpty(const serialPort_t *) {return true; }
|
||||||
bool isSerialTransmitBufferEmpty(const serialPort_t *instance){ UNUSED(instance); return true; }
|
void serialWrite(serialPort_t *, uint8_t ch) { printf("%c", ch);}
|
||||||
|
|
||||||
void serialWrite(serialPort_t *instance, uint8_t ch) { printf("%c", ch); UNUSED(instance); }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue