Contain timer module with related functions. More...
Macros | |
#define | IDLE_TO_SLEEP_TIME APP_TIMER_TICKS(2000*60) |
2 min in idle before going to sleep. More... | |
#define | MOTOR_STOP_TIME APP_TIMER_TICKS(5000) |
Wait 5 seconds before the program check if motor need to be stopped. More... | |
#define | UPDATE_MISSIONLOG_TIMER APP_TIMER_TICKS(1000) |
Update mission log every 0.5 sec. More... | |
#define | MEASURE_BATTERY_TIMER APP_TIMER_TICKS(10000) |
Measure battery voltage everey 10 sec when not in mission state. More... | |
#define | SENSORS_SAMPLE_TIMER APP_TIMER_TICKS(500) |
Set time between each SAADC and TMP117 sample. More... | |
#define | UPDATE_FSM_TIMER APP_TIMER_TICKS(500) |
When not in mission state update FSM within i strict interval. More... | |
#define | KHZ_TO_SEC 125000 |
Convert kHz to seconds to set mission timer. More... | |
Functions | |
nrfx_timer_event_handler_t | missionTimerHandler (nrf_timer_event_t event_type, void *p_context) |
mission Timer Handler - End current mission when triggered. More... | |
void | SleepTimerHandler (void) |
IDLE-to-Sleep timer handler. More... | |
void | stopMotorTimerHandler (void) |
stop Motor timer handler. More... | |
void | timers_init (void) |
Function for Timer initialization. More... | |
void | start_updateFSM_timer_handler () |
More... | |
void | stop_updateFSM_timer_handler () |
More... | |
void | startSampleSensorDatatimer () |
More... | |
void | stopSampleSensorDatatimer () |
More... | |
void | startSleepTimer () |
More... | |
void | stopSleepTimer () |
[start timer for Idle-to-sleep event] More... | |
void | startMotorStopTimer () |
[stop timer for Idle-to-sleep event] More... | |
void | startBatteryMeasureTimer () |
More... | |
void | stopBatteryMeasureTimer () |
More... | |
void | startUpdateMissionLogTimer () |
More... | |
void | stopUpdateMissionLogTimer () |
More... | |
void | startMissiontimer () |
More... | |
void | stopMissiontimer () |
More... | |
void | updateMissiontimer (uint32_t time) |
More... | |
void | uninitMissiontimer () |
More... | |
APP_TIMER_DEF (m_updateFSM_timer_id) | |
Create a variable to hold the repeated timer m_updateFSM_timer_id. More... | |
APP_TIMER_DEF (m_sleep_timer_id) | |
Create a variable to hold the single shot timer m_sleep_timer_id. More... | |
APP_TIMER_DEF (m_motorStop_timer_id) | |
Create a variable to hold the single shot timer m_motorStop_timer_id. More... | |
APP_TIMER_DEF (m_repeatedBattery_timer_id) | |
Create a variable to hold the repeated timer m_repeatedBattery_timer_id. More... | |
APP_TIMER_DEF (m_sampleSensorData_timer_id) | |
Create a variable to hold the repeated timer m_sampleSensorData_timer_id. More... | |
APP_TIMER_DEF (m_updateMissionLog_timer_id) | |
Create a variable to hold the repeated timer m_updateMissionLog_timer_id. More... | |
void | startStopMotorTimer (void) |
start timer for count down until check if motor has stopped. More... | |
Contain timer module with related functions.
#define IDLE_TO_SLEEP_TIME APP_TIMER_TICKS(2000*60) |
2 min in idle before going to sleep.
#define KHZ_TO_SEC 125000 |
Convert kHz to seconds to set mission timer.
#define MEASURE_BATTERY_TIMER APP_TIMER_TICKS(10000) |
Measure battery voltage everey 10 sec when not in mission state.
#define MOTOR_STOP_TIME APP_TIMER_TICKS(5000) |
Wait 5 seconds before the program check if motor need to be stopped.
#define SENSORS_SAMPLE_TIMER APP_TIMER_TICKS(500) |
Set time between each SAADC and TMP117 sample.
#define UPDATE_FSM_TIMER APP_TIMER_TICKS(500) |
When not in mission state update FSM within i strict interval.
#define UPDATE_MISSIONLOG_TIMER APP_TIMER_TICKS(1000) |
Update mission log every 0.5 sec.
APP_TIMER_DEF | ( | m_updateFSM_timer_id | ) |
Create a variable to hold the repeated timer m_updateFSM_timer_id.
APP_TIMER_DEF | ( | m_sleep_timer_id | ) |
Create a variable to hold the single shot timer m_sleep_timer_id.
APP_TIMER_DEF | ( | m_motorStop_timer_id | ) |
Create a variable to hold the single shot timer m_motorStop_timer_id.
APP_TIMER_DEF | ( | m_repeatedBattery_timer_id | ) |
Create a variable to hold the repeated timer m_repeatedBattery_timer_id.
APP_TIMER_DEF | ( | m_sampleSensorData_timer_id | ) |
Create a variable to hold the repeated timer m_sampleSensorData_timer_id.
APP_TIMER_DEF | ( | m_updateMissionLog_timer_id | ) |
Create a variable to hold the repeated timer m_updateMissionLog_timer_id.
nrfx_timer_event_handler_t missionTimerHandler | ( | nrf_timer_event_t | event_type, |
void * | p_context | ||
) |
mission Timer Handler - End current mission when triggered.
void SleepTimerHandler | ( | void | ) |
IDLE-to-Sleep timer handler.
void start_updateFSM_timer_handler | ( | ) |
start timer for FSM updates.
void startBatteryMeasureTimer | ( | ) |
start timer for measuring battery voltage.
void startMissiontimer | ( | ) |
start mission timer.
void startMotorStopTimer | ( | ) |
[stop timer for Idle-to-sleep event]
void startSampleSensorDatatimer | ( | ) |
start timer for SAADC sample.
void startSleepTimer | ( | ) |
start timer for Idle-to-sleep event.
void startStopMotorTimer | ( | void | ) |
start timer for count down until check if motor has stopped.
void startUpdateMissionLogTimer | ( | ) |
start timer to update mission log.
void stop_updateFSM_timer_handler | ( | ) |
stop timer for FSM updates.
void stopBatteryMeasureTimer | ( | ) |
stop timer for measuring battery voltage.
void stopMissiontimer | ( | ) |
stop mission timer.
void stopMotorTimerHandler | ( | void | ) |
stop Motor timer handler.
void stopSampleSensorDatatimer | ( | ) |
stop timer for SAADC sample.
void stopSleepTimer | ( | ) |
[start timer for Idle-to-sleep event]
stop timer for Idle-to-sleep event.
void stopUpdateMissionLogTimer | ( | ) |
stop timer to update mission log.
void timers_init | ( | void | ) |
Function for Timer initialization.
Initializes the timer module. This creates and starts application timers.
void uninitMissiontimer | ( | ) |
Uninitialize mission timer.
void updateMissiontimer | ( | uint32_t | ) |
Set new mission time.
[in] | time | Update timer during mission with pre-configured mission time |