From 442dbed94b3eae24287f4e1e87e1ffe81f8280b8 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sat, 22 Nov 2014 10:03:59 -0600 Subject: [PATCH] auto-sync --- firmware/console_util/datalogging.c | 2 +- firmware/controllers/trigger/main_trigger_callback.cpp | 2 +- firmware/controllers/trigger/trigger_central.cpp | 2 +- firmware/hw_layer/adc_inputs.cpp | 2 +- firmware/hw_layer/neo6m.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/firmware/console_util/datalogging.c b/firmware/console_util/datalogging.c index fb42087e3d..37a696170a 100644 --- a/firmware/console_util/datalogging.c +++ b/firmware/console_util/datalogging.c @@ -348,7 +348,7 @@ void resetLogging(Logging *logging) { * This method should only be invoked on main thread because only the main thread can write to the console */ void printMsg(Logging *logger, const char *fmt, ...) { - efiAssertVoid(getRemainingStack(chThdSelf()) > 256, "lowstck#5o"); + efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#5o"); // resetLogging(logging); // I guess 'reset' is not needed here? appendMsgPrefix(logger); diff --git a/firmware/controllers/trigger/main_trigger_callback.cpp b/firmware/controllers/trigger/main_trigger_callback.cpp index cc4d80ef70..414409a88b 100644 --- a/firmware/controllers/trigger/main_trigger_callback.cpp +++ b/firmware/controllers/trigger/main_trigger_callback.cpp @@ -293,7 +293,7 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex, Eng (void) ckpSignalType; efiAssertVoid(eventIndex < 2 * engine->engineConfiguration2->triggerShape.shaftPositionEventCount, "event index"); - efiAssertVoid(getRemainingStack(chThdSelf()) > 256, "lowstck#2"); + efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#2"); // todo: remove these local variables soon? engine_configuration_s *engineConfiguration = engine->engineConfiguration; diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index bce72720ef..4ee2832fea 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -69,7 +69,7 @@ void hwHandleShaftSignal(trigger_event_e signal) { if (triggerReentraint > maxTriggerReentraint) maxTriggerReentraint = triggerReentraint; triggerReentraint++; - efiAssertVoid(getRemainingStack(chThdSelf()) > 256, "lowstck#8"); + efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#8"); triggerCentral.handleShaftSignal(engine, signal); triggerReentraint--; } diff --git a/firmware/hw_layer/adc_inputs.cpp b/firmware/hw_layer/adc_inputs.cpp index 02c8a321d8..67496bbc78 100644 --- a/firmware/hw_layer/adc_inputs.cpp +++ b/firmware/hw_layer/adc_inputs.cpp @@ -443,7 +443,7 @@ static void setAdcDebugReporting(int value) { static void adc_callback_slow(ADCDriver *adcp, adcsample_t *buffer, size_t n) { (void) buffer; (void) n; - efiAssertVoid(getRemainingStack(chThdSelf()) > 512, "lowstck#9c"); + efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#9c"); /* Note, only in the ADC_COMPLETE state because the ADC driver fires * an intermediate callback when the buffer is half full. */ if (adcp->state == ADC_COMPLETE) { diff --git a/firmware/hw_layer/neo6m.c b/firmware/hw_layer/neo6m.c index 68359bd86f..c55beb9cad 100644 --- a/firmware/hw_layer/neo6m.c +++ b/firmware/hw_layer/neo6m.c @@ -31,7 +31,7 @@ extern board_configuration_s *boardConfiguration; static Logging logging; static SerialConfig GPSserialConfig = { GPS_SERIAL_SPEED, 0, USART_CR2_STOP1_BITS | USART_CR2_LINEN, 0 }; -static THD_WORKING_AREA(GPS_WORKING_AREA, UTILITY_THREAD_STACK_SIZE); +static THD_WORKING_AREA(gpsThreadStack, UTILITY_THREAD_STACK_SIZE); // this field holds our current state static loc_t GPSdata; @@ -118,7 +118,7 @@ void initGps(void) { mySetPadMode2("GPS rx", boardConfiguration->gps_rx_pin, PAL_MODE_ALTERNATE(7)); // todo: add a thread which would save location. If the GPS 5Hz - we should save the location each 200 ms - chThdCreateStatic(GPS_WORKING_AREA, sizeof(GPS_WORKING_AREA), LOWPRIO, GpsThreadEntryPoint, NULL); + chThdCreateStatic(gpsThreadStack, sizeof(gpsThreadStack), LOWPRIO, GpsThreadEntryPoint, NULL); addConsoleAction("gpsinfo", &printGpsInfo); }