diff --git a/source/shoh/src/threads/logging/Log.h b/source/shoh/src/threads/logging/Log.h index 34c0e0d..3bf6975 100644 --- a/source/shoh/src/threads/logging/Log.h +++ b/source/shoh/src/threads/logging/Log.h @@ -117,6 +117,10 @@ static void create_log_line_nots(const char * _status, #define LOG_DEBUG(fmt, ...) \ create_log_line(global_clock->getTimeFromStart(), C_DEBUG, __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__); +/* + * Even though it doesn't call timer, it still can cause a softlock on the UART transaction. + * Left only for short-term debugging purposes. + */ #define LOG_DEBUG_ISR(fmt, ...) \ create_log_line_nots(C_DEBUG_ISR, __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__); #else diff --git a/source/shoh/src/threads/manager/Menu.cpp b/source/shoh/src/threads/manager/Menu.cpp index 5c35086..4aabe1b 100644 --- a/source/shoh/src/threads/manager/Menu.cpp +++ b/source/shoh/src/threads/manager/Menu.cpp @@ -22,13 +22,13 @@ enum static const char * interface_messages [] = { "CURRENT %3d ", - "DESIRED %3d ", - "DESIRED[%3d] ", + "DESIRED %2d ", + "DESIRED [%2d] ", " Loading... " }; Menu::Menu(ThreadCommon::QueueManager* qm): _qm(qm), -current(&Menu::sInitView), ext_temp(-99, 99, 1), set_point(-99, 99, 1) +current(&Menu::sInitView), ext_temp(-99, 99, 1), set_point(10, 99, 1) { LOG_DEBUG("Creating Menu"); this->SetState(&Menu::sInitView); diff --git a/source/shoh/src/threads/master/Master.cpp b/source/shoh/src/threads/master/Master.cpp index ea1d38f..f834b94 100644 --- a/source/shoh/src/threads/master/Master.cpp +++ b/source/shoh/src/threads/master/Master.cpp @@ -105,16 +105,16 @@ void thread_master(void* pvParams) { LOG_INFO("Master Started"); Master m(manager->qm); LOG_INFO("Master is creating queues"); - manager->qm->createQueue(100, + manager->qm->createQueue(60, sizeof(Event), ThreadCommon::QueueManager::master_event_all); - manager->qm->createQueue(20, + manager->qm->createQueue(12, sizeof(Event), ThreadCommon::QueueManager::manager_event_master); - manager->qm->createQueue(20, + manager->qm->createQueue(12, sizeof(UserInterface::InterfaceWithData), ThreadCommon::QueueManager::ui_event_manager); - manager->qm->createQueue(10, + manager->qm->createQueue(5, sizeof(Event), ThreadCommon::QueueManager::relay_event_master); LOG_INFO("Master created queues"); @@ -122,7 +122,7 @@ void thread_master(void* pvParams) { LOG_INFO("Master is creating tasks"); manager->tm->createTask(thread_manager, "manager", - configMINIMAL_STACK_SIZE * 13,tskIDLE_PRIORITY + 1UL, + configMINIMAL_STACK_SIZE * 15,tskIDLE_PRIORITY + 1UL, static_cast(manager)); manager->tm->createTask(thread_rotary, "rotary", configMINIMAL_STACK_SIZE * 8,tskIDLE_PRIORITY + 1UL, diff --git a/source/shoh/src/threads/relay/Relay.cpp b/source/shoh/src/threads/relay/Relay.cpp index d548802..310b41b 100644 --- a/source/shoh/src/threads/relay/Relay.cpp +++ b/source/shoh/src/threads/relay/Relay.cpp @@ -39,7 +39,7 @@ void inline RelayDevice::RelayOff() Relay::Relay(ThreadCommon::QueueManager* qm): - _qm(qm), ext_temp(0x7f), setpoint(0) + _qm(qm), setpoint(0), ext_temp(0x7f) { LOG_DEBUG("Creating Relay"); } diff --git a/source/shoh/src/threads/rotary/Rotary.cpp b/source/shoh/src/threads/rotary/Rotary.cpp index 9c0e382..fcdce48 100644 --- a/source/shoh/src/threads/rotary/Rotary.cpp +++ b/source/shoh/src/threads/rotary/Rotary.cpp @@ -21,10 +21,6 @@ extern "C" portBASE_TYPE xHigherPriorityWoken = pdFALSE; uint8_t data = ThreadCommon::RotaryAction::Right; xQueueSendFromISR (*p_rotary_isr_q, &data, &xHigherPriorityWoken); - if(!xHigherPriorityWoken) - { - LOG_DEBUG_ISR("[PIN_INT0_IRQn] portEND_SWITCHING_ISR called with False value"); - } portEND_SWITCHING_ISR(xHigherPriorityWoken); } @@ -35,10 +31,6 @@ extern "C" portBASE_TYPE xHigherPriorityWoken = pdFALSE; uint8_t data = ThreadCommon::RotaryAction::Left; xQueueSendFromISR (*p_rotary_isr_q, &data, &xHigherPriorityWoken); - if(!xHigherPriorityWoken) - { - LOG_DEBUG_ISR("[PIN_INT1_IRQn] portEND_SWITCHING_ISR called with False value"); - } portEND_SWITCHING_ISR(xHigherPriorityWoken); } @@ -49,10 +41,6 @@ extern "C" portBASE_TYPE xHigherPriorityWoken = pdFALSE; uint8_t data = ThreadCommon::RotaryAction::Press; xQueueSendFromISR (*p_rotary_isr_q, &data, &xHigherPriorityWoken); - if(!xHigherPriorityWoken) - { - LOG_DEBUG_ISR("[PIN_INT2_IRQn] portEND_SWITCHING_ISR called with False value"); - } portEND_SWITCHING_ISR(xHigherPriorityWoken); } }