The program sends the current location over the cellular network.
Dependencies: aconno_I2C ublox-at-cellular-interface gnss ublox-cellular-base Lis2dh12 ublox-cellular-base-n2xx ublox-at-cellular-interface-n2xx low-power-sleep
Fork of example-gnss by
tasks/tasks.h@9:f943c09d9173, 2018-12-19 (annotated)
- Committer:
- jurica238814
- Date:
- Wed Dec 19 15:12:25 2018 +0100
- Revision:
- 9:f943c09d9173
- Parent:
- 8:2bf886335fd0
Stable version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jurica238814 | 8:2bf886335fd0 | 1 | /** |
jurica238814 | 8:2bf886335fd0 | 2 | * Collection of all tasks |
jurica238814 | 8:2bf886335fd0 | 3 | * Made by Jurica @ aconno |
jurica238814 | 8:2bf886335fd0 | 4 | * More info @ aconno.de |
jurica238814 | 8:2bf886335fd0 | 5 | * |
jurica238814 | 8:2bf886335fd0 | 6 | */ |
jurica238814 | 8:2bf886335fd0 | 7 | |
jurica238814 | 8:2bf886335fd0 | 8 | #ifndef __TASKS_H__ |
jurica238814 | 8:2bf886335fd0 | 9 | #define __TASKS_H__ |
jurica238814 | 8:2bf886335fd0 | 10 | |
jurica238814 | 8:2bf886335fd0 | 11 | #include "mbed.h" |
jurica238814 | 8:2bf886335fd0 | 12 | #include "aconnoConfig.h" |
jurica238814 | 8:2bf886335fd0 | 13 | #include "uBloxSara.h" |
jurica238814 | 8:2bf886335fd0 | 14 | #include "gnss.h" |
jurica238814 | 8:2bf886335fd0 | 15 | |
jurica238814 | 8:2bf886335fd0 | 16 | struct myParams_t |
jurica238814 | 8:2bf886335fd0 | 17 | { |
jurica238814 | 8:2bf886335fd0 | 18 | GnssSerial *gnss; |
jurica238814 | 8:2bf886335fd0 | 19 | UBloxSara *sara; |
jurica238814 | 8:2bf886335fd0 | 20 | }; |
jurica238814 | 8:2bf886335fd0 | 21 | |
jurica238814 | 9:f943c09d9173 | 22 | enum locationFlag_t |
jurica238814 | 9:f943c09d9173 | 23 | { |
jurica238814 | 9:f943c09d9173 | 24 | OLD, |
jurica238814 | 9:f943c09d9173 | 25 | NEW |
jurica238814 | 9:f943c09d9173 | 26 | }; |
jurica238814 | 9:f943c09d9173 | 27 | |
jurica238814 | 8:2bf886335fd0 | 28 | enum MainStates |
jurica238814 | 8:2bf886335fd0 | 29 | { |
jurica238814 | 8:2bf886335fd0 | 30 | STATE_IDLE, |
jurica238814 | 8:2bf886335fd0 | 31 | STATE_ALARM, |
jurica238814 | 8:2bf886335fd0 | 32 | STATE_ALARM_OFF, |
jurica238814 | 8:2bf886335fd0 | 33 | STATE_LIS_DETECTION |
jurica238814 | 8:2bf886335fd0 | 34 | }; |
jurica238814 | 8:2bf886335fd0 | 35 | |
jurica238814 | 8:2bf886335fd0 | 36 | void idleCallback(); |
jurica238814 | 8:2bf886335fd0 | 37 | void alarmCallback(myParams_t *myParams); |
jurica238814 | 8:2bf886335fd0 | 38 | void alarmOffCallback(); |
jurica238814 | 8:2bf886335fd0 | 39 | void movementCallback(); |
jurica238814 | 8:2bf886335fd0 | 40 | void gnssLocationCallback(GnssSerial *gnss); |
jurica238814 | 8:2bf886335fd0 | 41 | |
jurica238814 | 8:2bf886335fd0 | 42 | #endif // __TASKS_H__ |