main: working version 0.2
This commit is contained in:
parent
9be6c99e2c
commit
486b4a40b2
@ -16,7 +16,7 @@ extern QueueHandle_t logging_queue;
|
|||||||
/* ================= Settings ================== */
|
/* ================= Settings ================== */
|
||||||
#define LOG_COLORED_OUTPUT
|
#define LOG_COLORED_OUTPUT
|
||||||
#define HIGH_PRIORITY_DEBUG
|
#define HIGH_PRIORITY_DEBUG
|
||||||
#define LOG_DEBUG_MESSAGES 1
|
#define LOG_DEBUG_MESSAGES 0
|
||||||
/* ================= Settings ================== */
|
/* ================= Settings ================== */
|
||||||
|
|
||||||
// internal debug defines
|
// internal debug defines
|
||||||
|
|||||||
@ -50,7 +50,7 @@ void Master::HandleEventType(Event* e)
|
|||||||
//Comes from rotary, goes to manager
|
//Comes from rotary, goes to manager
|
||||||
send = _qm->send<Event>(ThreadCommon::QueueManager::manager_event_master, e, 0);
|
send = _qm->send<Event>(ThreadCommon::QueueManager::manager_event_master, e, 0);
|
||||||
//LOG_WARNING("Timestamp: %zus, Clock: %zu, Chip freq: %zu", LPC_SCT1->COUNT_U / Chip_Clock_GetMainClockRate(), LPC_SCT1->COUNT_U, Chip_Clock_GetMainClockRate());
|
//LOG_WARNING("Timestamp: %zus, Clock: %zu, Chip freq: %zu", LPC_SCT1->COUNT_U / Chip_Clock_GetMainClockRate(), LPC_SCT1->COUNT_U, Chip_Clock_GetMainClockRate());
|
||||||
if (send) LOG_DEBUG("Rotary: %s has been forwarded to manager", rotary_direction[rd]);
|
if (send) LOG_INFO("Rotary: %s has been forwarded to manager", rotary_direction[rd]);
|
||||||
break;
|
break;
|
||||||
case Event::InternalTemp:
|
case Event::InternalTemp:
|
||||||
// TODO remove (deprecated)
|
// TODO remove (deprecated)
|
||||||
|
|||||||
@ -24,11 +24,11 @@ private:
|
|||||||
ThreadCommon::PIN_ROTARY_SIG_A,
|
ThreadCommon::PIN_ROTARY_SIG_A,
|
||||||
true, true, false, true, PIN_INT0_IRQn},
|
true, true, false, true, PIN_INT0_IRQn},
|
||||||
{ ThreadCommon::PORT_ROTARY_SIG_B,
|
{ ThreadCommon::PORT_ROTARY_SIG_B,
|
||||||
ThreadCommon::PIN_ROTARY_SIG_A,
|
ThreadCommon::PIN_ROTARY_SIG_B,
|
||||||
true, true, false},
|
true, true, false},
|
||||||
{ ThreadCommon::PORT_ROTARY_PRESS,
|
{ ThreadCommon::PORT_ROTARY_PRESS,
|
||||||
ThreadCommon::PIN_ROTARY_SIG_A,
|
ThreadCommon::PIN_ROTARY_PRESS,
|
||||||
true, true, false, true, PIN_INT1_IRQn} };
|
true, true, false, true, PIN_INT1_IRQn} };
|
||||||
};
|
};
|
||||||
|
|
||||||
void thread_rotary(void* pvParams);
|
void thread_rotary(void* pvParams);
|
||||||
|
|||||||
@ -20,7 +20,7 @@ void Temperature::taskFunction()
|
|||||||
SensorTempSHT20 ext_temp_sensor(this->_pi2c);
|
SensorTempSHT20 ext_temp_sensor(this->_pi2c);
|
||||||
Event t (Event::ExternalTemp, -128);
|
Event t (Event::ExternalTemp, -128);
|
||||||
int8_t temp_value = -128;
|
int8_t temp_value = -128;
|
||||||
_qm->send<Event>(ThreadCommon::QueueManager::master_event_all, &t, 0);
|
while(ext_temp_sensor.is_up() != true);
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (ext_temp_sensor.is_up())
|
if (ext_temp_sensor.is_up())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user