From 57991d61ee3673157da455a7565fcab82c563226 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Mon, 11 Jan 2016 19:02:19 -0500 Subject: [PATCH] auto-sync --- firmware/console/binary/tunerstudio.cpp | 4 ++-- firmware/console/binary/tunerstudio.h | 2 +- firmware/console/console_io.cpp | 2 +- firmware/console/status_loop.cpp | 8 ++++---- firmware/development/engine_sniffer.cpp | 4 ++-- firmware/development/engine_sniffer.h | 4 ++-- firmware/development/test/test.c | 16 ++++++++-------- firmware/development/test/test.h | 10 +++++----- firmware/hw_layer/HIP9011.cpp | 2 +- firmware/hw_layer/adc_inputs.h | 2 +- firmware/hw_layer/digital_input_hw.h | 4 ++-- firmware/hw_layer/stepper.cpp | 2 +- firmware/hw_layer/trigger_input.cpp | 4 ++-- firmware/rusefi.cpp | 2 +- firmware/util/datalogging.cpp | 6 +++--- firmware/util/datalogging.h | 2 +- firmware/util/loggingcentral.cpp | 2 +- 17 files changed, 38 insertions(+), 38 deletions(-) diff --git a/firmware/console/binary/tunerstudio.cpp b/firmware/console/binary/tunerstudio.cpp index 49ef436231..46ae335b0d 100644 --- a/firmware/console/binary/tunerstudio.cpp +++ b/firmware/console/binary/tunerstudio.cpp @@ -107,7 +107,7 @@ ts_channel_s tsChannel; extern uint8_t crcWriteBuffer[300]; -static int ts_serial_ready(bool_t isConsoleRedirect) { +static int ts_serial_ready(bool isConsoleRedirect) { #if EFI_PROD_CODE if (isSerialOverUart() ^ isConsoleRedirect) { // TS uses USB when console uses serial @@ -413,7 +413,7 @@ static bool isKnownCommand(char command) { static uint8_t firstByte; static uint8_t secondByte; -void runBinaryProtocolLoop(ts_channel_s *tsChannel, bool_t isConsoleRedirect) { +void runBinaryProtocolLoop(ts_channel_s *tsChannel, bool isConsoleRedirect) { int wasReady = false; while (true) { int isReady = ts_serial_ready(isConsoleRedirect); diff --git a/firmware/console/binary/tunerstudio.h b/firmware/console/binary/tunerstudio.h index 4a4e458c5c..8a20e0d384 100644 --- a/firmware/console/binary/tunerstudio.h +++ b/firmware/console/binary/tunerstudio.h @@ -54,7 +54,7 @@ void requestBurn(void); void startTunerStudioConnectivity(void); void syncTunerStudioCopy(void); -void runBinaryProtocolLoop(ts_channel_s *tsChannel, bool_t isConsoleRedirect); +void runBinaryProtocolLoop(ts_channel_s *tsChannel, bool isConsoleRedirect); #if defined __GNUC__ // GCC diff --git a/firmware/console/console_io.cpp b/firmware/console/console_io.cpp index 51eb2256d1..938a6f2c55 100644 --- a/firmware/console/console_io.cpp +++ b/firmware/console/console_io.cpp @@ -159,7 +159,7 @@ bool isConsoleReady(void) { } #endif /* EFI_PROD_CODE || EFI_EGT */ -bool_t consoleInBinaryMode = false; +bool consoleInBinaryMode = false; ts_channel_s binaryConsole; diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 1dfa2dfacb..76157cefdd 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -58,7 +58,7 @@ #include "settings.h" #include "rusefi_outputs.h" -extern bool_t main_loop_started; +extern bool main_loop_started; #if EFI_PROD_CODE || defined(__DOXYGEN__) // todo: move this logic to algo folder! @@ -73,7 +73,7 @@ extern bool_t main_loop_started; extern engine_pins_s enginePins; -static bool_t subscription[(int) RO_LAST_ELEMENT]; +static bool subscription[(int) RO_LAST_ELEMENT]; // this 'true' value is needed for simulator static volatile bool fullLog = true; @@ -497,8 +497,8 @@ static void setBlinkingPeriod(int value) { extern efitick_t lastDecodingErrorTime; -static bool_t isTriggerErrorNow() { - bool_t justHadError = (getTimeNowNt() - lastDecodingErrorTime) < US2NT(2 * 1000 * 3 * blinkingPeriod); +static bool isTriggerErrorNow() { + bool justHadError = (getTimeNowNt() - lastDecodingErrorTime) < US2NT(2 * 1000 * 3 * blinkingPeriod); return justHadError || isTriggerDecoderError(); } diff --git a/firmware/development/engine_sniffer.cpp b/firmware/development/engine_sniffer.cpp index 45a1a796d2..8193b6b363 100644 --- a/firmware/development/engine_sniffer.cpp +++ b/firmware/development/engine_sniffer.cpp @@ -90,7 +90,7 @@ void WaveChart::resetWaveChart() { static char WAVE_LOGGING_BUFFER[WAVE_LOGGING_SIZE] CCM_OPTIONAL; -bool_t WaveChart::isStartedTooLongAgo() { +bool WaveChart::isStartedTooLongAgo() { /** * Say at 300rpm we should get at least four events per revolution. * That's 300/60*4=20 events per second @@ -101,7 +101,7 @@ bool_t WaveChart::isStartedTooLongAgo() { return startTimeNt != 0 && NT2US(chartDurationNt) > engineConfiguration->engineChartSize * 1000000 / 20; } -bool_t WaveChart::isWaveChartFull() { +bool WaveChart::isWaveChartFull() { return counter >= engineConfiguration->engineChartSize; } diff --git a/firmware/development/engine_sniffer.h b/firmware/development/engine_sniffer.h index eab6225b79..2678629ed7 100644 --- a/firmware/development/engine_sniffer.h +++ b/firmware/development/engine_sniffer.h @@ -23,8 +23,8 @@ public: void init(); void publishChart(); void resetWaveChart(); - bool_t isWaveChartFull(); - bool_t isStartedTooLongAgo(); + bool isWaveChartFull(); + bool isStartedTooLongAgo(); void publishChartIfFull(); void addWaveChartEvent3(const char *name, const char *msg); private: diff --git a/firmware/development/test/test.c b/firmware/development/test/test.c index 4a89322fb0..a93c69f99d 100644 --- a/firmware/development/test/test.c +++ b/firmware/development/test/test.c @@ -24,7 +24,7 @@ #include "main.h" -#if EFI_PERF_METRICS +#if EFI_PERF_METRICS || defined(__DOXYGEN__) #include "test.h" #include "testbmk.h" @@ -37,7 +37,7 @@ static ROMCONST struct testcase * ROMCONST *patterns[] = { NULL }; -static bool_t local_fail, global_fail; +static bool local_fail, global_fail; static unsigned failpoint; static char tokens_buffer[MAX_TOKENS]; static char *tokp; @@ -51,7 +51,7 @@ union test_buffers test; /* * Pointers to the spawned threads. */ -Thread *threads[MAX_THREADS]; +thread_t *threads[MAX_THREADS]; /* * Pointers to the working areas. @@ -135,7 +135,7 @@ void test_emit_token(char token) { /* * Assertions. */ -bool_t _test_fail(unsigned point) { +bool _test_fail(unsigned point) { local_fail = TRUE; global_fail = TRUE; @@ -143,14 +143,14 @@ bool_t _test_fail(unsigned point) { return TRUE; } -bool_t _test_assert(unsigned point, bool_t condition) { +bool _test_assert(unsigned point, bool condition) { if (!condition) return _test_fail(point); return FALSE; } -bool_t _test_assert_sequence(unsigned point, char *expected) { +bool _test_assert_sequence(unsigned point, char *expected) { char *cp = tokens_buffer; while (cp < tokp) { if (*cp++ != *expected++) @@ -162,7 +162,7 @@ bool_t _test_assert_sequence(unsigned point, char *expected) { return FALSE; } -bool_t _test_assert_time_window(unsigned point, systime_t start, systime_t end) { +bool _test_assert_time_window(unsigned point, systime_t start, systime_t end) { return _test_assert(point, chTimeIsWithin(start, end)); } @@ -236,7 +236,7 @@ systime_t test_wait_tick(void) { /** * @brief Set to @p TRUE when the test timer reaches its deadline. */ -bool_t test_timer_done; +bool test_timer_done; static VirtualTimer vt; static void tmr(void *p) { diff --git a/firmware/development/test/test.h b/firmware/development/test/test.h index e5778177bd..0db2b572f7 100644 --- a/firmware/development/test/test.h +++ b/firmware/development/test/test.h @@ -84,10 +84,10 @@ extern "C" { void test_print(const char *msgp); void test_println(const char *msgp); void test_emit_token(char token); - bool_t _test_fail(unsigned point); - bool_t _test_assert(unsigned point, bool_t condition); - bool_t _test_assert_sequence(unsigned point, char *expected); - bool_t _test_assert_time_window(unsigned point, systime_t start, systime_t end); + bool _test_fail(unsigned point); + bool _test_assert(unsigned point, bool condition); + bool _test_assert_sequence(unsigned point, char *expected); + bool _test_assert_time_window(unsigned point, systime_t start, systime_t end); void test_terminate_threads(void); void test_wait_threads(void); systime_t test_wait_tick(void); @@ -165,7 +165,7 @@ extern "C" { extern Thread *threads[MAX_THREADS]; extern union test_buffers test; extern void * ROMCONST wa[]; -extern bool_t test_timer_done; +extern bool test_timer_done; #endif #endif /* _TEST_H_ */ diff --git a/firmware/hw_layer/HIP9011.cpp b/firmware/hw_layer/HIP9011.cpp index 3a086fbff2..cca06f600a 100644 --- a/firmware/hw_layer/HIP9011.cpp +++ b/firmware/hw_layer/HIP9011.cpp @@ -329,7 +329,7 @@ void hipAdcCallback(adcsample_t value) { } } } -static bool_t needToInit = true; +static bool needToInit = true; static void hipStartupCode(void) { // D[4:1] = 0000 : 4 MHz diff --git a/firmware/hw_layer/adc_inputs.h b/firmware/hw_layer/adc_inputs.h index 2eaacd4ea9..330faa548c 100644 --- a/firmware/hw_layer/adc_inputs.h +++ b/firmware/hw_layer/adc_inputs.h @@ -49,7 +49,7 @@ typedef struct { #define adcToVoltsDivided(adc) (adcToVolts(adc) * engineConfiguration->analogInputDividerCoefficient) #else -#define getAdcValue(channel) 0 +#define getAdcValue(msg, channel) 0 #endif /* HAL_USE_ADC */ #endif /* ADC_INPUTS_H_ */ diff --git a/firmware/hw_layer/digital_input_hw.h b/firmware/hw_layer/digital_input_hw.h index baa39a396c..4ecca9c2e1 100644 --- a/firmware/hw_layer/digital_input_hw.h +++ b/firmware/hw_layer/digital_input_hw.h @@ -16,8 +16,8 @@ typedef struct { ICUDriver *driver; - bool_t isActiveHigh; // false for ICU_INPUT_ACTIVE_LOW, true for ICU_INPUT_ACTIVE_HIGH - volatile bool_t started; + bool isActiveHigh; // false for ICU_INPUT_ACTIVE_LOW, true for ICU_INPUT_ACTIVE_HIGH + volatile bool started; // todo: make this a template & reduce number of listeners? // todo: would one listener be enough? diff --git a/firmware/hw_layer/stepper.cpp b/firmware/hw_layer/stepper.cpp index c88804f140..c470028301 100644 --- a/firmware/hw_layer/stepper.cpp +++ b/firmware/hw_layer/stepper.cpp @@ -30,7 +30,7 @@ static msg_t stThread(StepperMotor *motor) { chThdSleepMilliseconds(ST_DELAY_MS); continue; } - bool_t isIncrementing = targetPosition > currentPosition; + bool isIncrementing = targetPosition > currentPosition; palWritePad(motor->directionPort, motor->directionPin, isIncrementing); if (isIncrementing) { motor->currentPosition++; diff --git a/firmware/hw_layer/trigger_input.cpp b/firmware/hw_layer/trigger_input.cpp index fde0f65459..b2ae7f3174 100644 --- a/firmware/hw_layer/trigger_input.cpp +++ b/firmware/hw_layer/trigger_input.cpp @@ -74,10 +74,10 @@ static ICUDriver *turnOnTriggerInputPin(brain_pin_e hwPin) { // todo: reuse 'setWaveReaderMode' method here? if (driver != NULL) { // todo: once http://forum.chibios.org/phpbb/viewtopic.php?f=16&t=1757 is fixed -// bool_t needWidthCallback = !CONFIG(useOnlyFrontForTrigger) || TRIGGER_SHAPE(useRiseEdge); +// bool needWidthCallback = !CONFIG(useOnlyFrontForTrigger) || TRIGGER_SHAPE(useRiseEdge); // shaft_icucfg.width_cb = needWidthCallback ? shaft_icu_width_callback : NULL; -// bool_t needPeriodCallback = !CONFIG(useOnlyFrontForTrigger) || !TRIGGER_SHAPE(useRiseEdge); +// bool needPeriodCallback = !CONFIG(useOnlyFrontForTrigger) || !TRIGGER_SHAPE(useRiseEdge); // shaft_icucfg.period_cb = needPeriodCallback ? shaft_icu_period_callback : NULL; efiIcuStart(driver, &shaft_icucfg); diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 5a7466a613..b9d50f7390 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -119,7 +119,7 @@ static LoggingWithStorage sharedLogger("main"); -bool_t main_loop_started = false; +bool main_loop_started = false; static MemoryStream firmwareErrorMessageStream; static char panicMessage[200]; diff --git a/firmware/util/datalogging.cpp b/firmware/util/datalogging.cpp index 7508f449ae..40de22e038 100644 --- a/firmware/util/datalogging.cpp +++ b/firmware/util/datalogging.cpp @@ -44,12 +44,12 @@ static MemoryStream intermediateLoggingBuffer; static uint8_t intermediateLoggingBufferData[INTERMEDIATE_LOGGING_BUFFER_SIZE] CCM_OPTIONAL; //todo define max-printf-buffer -static bool_t intermediateLoggingBufferInited = false; +static bool intermediateLoggingBufferInited = false; /** * @returns true if data does not fit into this buffer */ -static INLINE bool_t validateBuffer(Logging *logging, uint32_t extraLen) { +static INLINE bool validateBuffer(Logging *logging, uint32_t extraLen) { if (logging->buffer == NULL) { firmwareError("Logging not initialized: %s", logging->name); return true; @@ -67,7 +67,7 @@ static INLINE bool_t validateBuffer(Logging *logging, uint32_t extraLen) { void append(Logging *logging, const char *text) { efiAssertVoid(text != NULL, "append NULL"); uint32_t extraLen = efiStrlen(text); - bool_t isError = validateBuffer(logging, extraLen); + bool isError = validateBuffer(logging, extraLen); if (isError) { return; } diff --git a/firmware/util/datalogging.h b/firmware/util/datalogging.h index 72ab432bf9..fac9be3b83 100644 --- a/firmware/util/datalogging.h +++ b/firmware/util/datalogging.h @@ -35,7 +35,7 @@ public: */ char *linePointer; int bufferSize; - volatile bool_t isInitialized; + volatile bool isInitialized; }; class LoggingWithStorage : public Logging { diff --git a/firmware/util/loggingcentral.cpp b/firmware/util/loggingcentral.cpp index 34a4f3ecc8..c7d096ebbb 100644 --- a/firmware/util/loggingcentral.cpp +++ b/firmware/util/loggingcentral.cpp @@ -94,7 +94,7 @@ char * swapOutputBuffers(int *actualOutputBufferSize) { return outputBuffer; } -extern bool_t consoleInBinaryMode; +extern bool consoleInBinaryMode; /** * This method actually sends all the pending data to the communication layer.