Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00014
00015 #ifndef _AP_COMMON_H
00016 #define _AP_COMMON_H
00017
00018 #include <stdint.h>
00019 #include "include/menu.h"
00020 #include "c++.h"
00021 #include "AP_Vector.h"
00022 #include "AP_Loop.h"
00023 #include "AP_Var.h"
00024
00027
00028
00029
00030
00031
00032
00033
00034
00035 #pragma GCC diagnostic warning "-Wall"
00036 #pragma GCC diagnostic warning "-Wextra"
00037 #pragma GCC diagnostic warning "-Wlogical-op"
00038 #pragma GCC diagnostic ignored "-Wredundant-decls"
00039
00040
00041
00042
00043
00044
00045
00046 #pragma GCC diagnostic error "-Wfloat-equal"
00047
00048
00049
00050
00051
00052 #if PRINTF_FORMAT_WARNING_DEBUG
00053 # undef PSTR
00054 # define PSTR(_x) _x // help the compiler with printf_P
00055 # define float double // silence spurious format warnings for %f
00056 #else
00057
00058
00059
00060
00061
00062
00063
00064 # undef PROGMEM
00065 # define PROGMEM __attribute__(( section(".progmem.data") ))
00066 # undef PSTR
00067 # define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); &__c[0];}))
00068 #endif
00069
00070
00074 #define ToRad(x) (x*0.01745329252) // *pi/180
00075 #define ToDeg(x) (x*57.2957795131) // *180/pi
00076
00077
00078
00084
00085
00086 struct Location {
00087 uint8_t id;
00088 uint8_t p1;
00089 int32_t alt;
00090 int32_t lat;
00091 int32_t lng;
00092 };
00093
00095
00101
00102
00105 #define ToDeg(x) (x*57.2957795131) // *180/pi
00106 #define ToRad(x) (x*0.01745329252) // *pi/180
00107
00109
00110
00111 #endif // _AP_COMMON_H