ccNOos  v0.0.0
Build Portable Microcontroller Applications!
APTmodule.h
Go to the documentation of this file.
1 /** \file APTmodule.h
2 * \brief <a href="https://www.inmechasol.org/" target="_blank">IMS</a>:
3  <a href="https://github.com/InMechaSol/ccNOos" target="_blank">ccNOos</a>,
4  Declarations for straight C and C++
5 
6  Copyright 2021 <a href="https://www.inmechasol.org/" target="_blank">InMechaSol, Inc</a>
7 
8  Licensed under the Apache License, Version 2.0(the "License");
9  you may not use this file except in compliance with the License.
10  You may obtain a copy of the License at
11 
12  http://www.apache.org/licenses/LICENSE-2.0
13 
14  Unless required by applicable law or agreed to in writing, software
15  distributed under the License is distributed on an "AS IS" BASIS,
16  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  See the License for the specific language governing permissions and
18  limitations under the License.
19 
20 Notes:
21  (.c includes .h) - for straight C or
22  (.cpp includes .c which includes .h) - for C++ wrapped straight C
23  *Always compiled to a single compilation unit, either C or CPP, not both
24 
25 */
26 
27 #ifndef __APTmODULEH__
28 #define __APTmODULEH__
29 
30 #include "NEO_LEA_M8T.h"
31 #include "HMR3300.h"
32 
33 
34 
35 // APT Module Data Structure
36 struct gpsStruct
37 {
39  struct gpsData data;
40  UI_8 newGPSData;
41  UI_8 Connected;
42 };
43 struct gpsStruct creategpsStruct();
44 UI_8 readGPS(struct gpsStruct* gpsStructPtrIn);
45 
47 {
49  struct eCompDataStruct data;
51  UI_8 Connected;
52 };
54 UI_8 readEcompass(struct eCompStruct* eCompStructPtrIn);
55 
56 struct aptStruct
57 {
58  struct gpsStruct GPS;
59  struct eCompStruct eCompass;
60 };
61 struct aptStruct createaptStruct();
62 void tryReadAPTData(struct aptStruct* aptStructPtrIn);
63 
64 // WMM Data Structure
65 struct wmmStruct
66 {
68  // save non-volatile...
69  float lastGoodThreshold; // meters
70  float lastGoodMultiplier; // deg per meter
75 };
76 struct wmmStruct createwmmStruct();
77 
78 
79 
80 #ifdef __USINGCONSOLEMENU
81 
82 void parseAPTMenuAPI(struct aptStruct* aptStructPtrIn, struct uiStruct* uiStructPtrIn);
83 void writeAPTMenuScreen(struct aptStruct* aptStructPtrIn, struct uiStruct* uiStructPtrIn);
84 void writeAPTLogLine(struct aptStruct* aptStructPtrIn, struct logStruct* logStructPtrIn);
85 void parseAPTConfigLine(struct aptStruct* aptStructPtrIn, struct configStruct* configStructPtrIn);
86 
87 #endif
88 
89 #ifdef __cplusplus
90 
91 
92 #endif // !__cplusplus
93 #endif // !__APTmODULEH__
parseAPTConfigLine
void parseAPTConfigLine(struct aptStruct *aptStructPtrIn, struct configStruct *configStructPtrIn)
Definition: PlatformApp_Serialization.c:40
wmmStruct::lastGoodlatitude
float lastGoodlatitude
Definition: APTmodule.h:71
eCompStruct::Connected
UI_8 Connected
Definition: APTmodule.h:51
HMR3300.h
IMS: ccNOos, Declarations for straight C and C++
gpsStruct::Connected
UI_8 Connected
Definition: APTmodule.h:41
creategpsStruct
struct gpsStruct creategpsStruct()
Definition: APTmodule.c:31
tryReadAPTData
void tryReadAPTData(struct aptStruct *aptStructPtrIn)
Definition: APTmodule.c:69
writeAPTLogLine
void writeAPTLogLine(struct aptStruct *aptStructPtrIn, struct logStruct *logStructPtrIn)
Definition: PlatformApp_Serialization.c:39
eCompStruct::neweCompassData
UI_8 neweCompassData
Definition: APTmodule.h:50
wmmStruct::magdeclination
float magdeclination
Definition: APTmodule.h:67
wmmStruct::lastGoodThreshold
float lastGoodThreshold
Definition: APTmodule.h:69
gpsStruct::devptr
struct SerialDeviceStruct * devptr
Definition: APTmodule.h:38
readEcompass
UI_8 readEcompass(struct eCompStruct *eCompStructPtrIn)
Definition: Application_Platform_Main.c:74
eCompDataStruct
Definition: HMR3300.h:34
wmmStruct
Definition: APTmodule.h:66
SerialDeviceStruct
Definition: io_device.h:116
readGPS
UI_8 readGPS(struct gpsStruct *gpsStructPtrIn)
Definition: Application_Platform_Main.c:73
wmmStruct::lastGoodaltitude
float lastGoodaltitude
Definition: APTmodule.h:73
eCompStruct::data
struct eCompDataStruct data
Definition: APTmodule.h:49
createaptStruct
struct aptStruct createaptStruct()
Definition: APTmodule.c:49
aptStruct::GPS
struct gpsStruct GPS
Definition: APTmodule.h:58
wmmStruct::lastGoodMultiplier
float lastGoodMultiplier
Definition: APTmodule.h:70
gpsStruct::data
struct gpsData data
Definition: APTmodule.h:39
NEO_LEA_M8T.h
IMS: ccNOos, Declarations for straight C and C++
createeCompStruct
struct eCompStruct createeCompStruct()
Definition: APTmodule.c:40
aptStruct
Definition: APTmodule.h:57
createwmmStruct
struct wmmStruct createwmmStruct()
Definition: APTmodule.c:56
wmmStruct::lastGoodmagdeclination
float lastGoodmagdeclination
Definition: APTmodule.h:74
eCompStruct::devptr
struct SerialDeviceStruct * devptr
Definition: APTmodule.h:48
gpsStruct
Definition: APTmodule.h:37
wmmStruct::lastGoodlongitude
float lastGoodlongitude
Definition: APTmodule.h:72
eCompStruct
Definition: APTmodule.h:47
gpsStruct::newGPSData
UI_8 newGPSData
Definition: APTmodule.h:40
writeAPTMenuScreen
void writeAPTMenuScreen(struct aptStruct *aptStructPtrIn, struct uiStruct *uiStructPtrIn)
Definition: MenuAPI.c:452
parseAPTMenuAPI
void parseAPTMenuAPI(struct aptStruct *aptStructPtrIn, struct uiStruct *uiStructPtrIn)
Definition: MenuAPI.c:395
gpsData
Definition: NEO_LEA_M8T.h:34
aptStruct::eCompass
struct eCompStruct eCompass
Definition: APTmodule.h:59