kopia lustrzana https://github.com/bristol-seds/pico-tracker
Rename geofence_aprs to geofence_aprs_zones for clarity
rodzic
802954f8dd
commit
990d2c07d7
|
@ -2,8 +2,8 @@
|
||||||
* Autogenerated aprs zone structures. See sim/geofence
|
* Autogenerated aprs zone structures. See sim/geofence
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GEOFENCE_APRS_H
|
#ifndef GEOFENCE_APRS_ZONES_H
|
||||||
#define GEOFENCE_APRS_H
|
#define GEOFENCE_APRS_ZONES_H
|
||||||
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
@ -25,4 +25,4 @@ struct aprs_zone_t {
|
||||||
|
|
||||||
const struct aprs_zone_t aprs_zones[11];
|
const struct aprs_zone_t aprs_zones[11];
|
||||||
|
|
||||||
#endif /* GEOFENCE_APRS_H */
|
#endif /* GEOFENCE_APRS_ZONES_H */
|
|
@ -6,7 +6,7 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "samd20.h"
|
#include "samd20.h"
|
||||||
#include "geofence_aprs.h"
|
#include "geofence_aprs_zones.h"
|
||||||
|
|
||||||
|
|
||||||
/* Longitude, Latitude */
|
/* Longitude, Latitude */
|
|
@ -27,12 +27,15 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "samd20.h"
|
#include "samd20.h"
|
||||||
#include "geofence_aprs.h"
|
#include "geofence_aprs_zones.h"
|
||||||
#include "geofence_telemetry.h"
|
#include "geofence_telemetry.h"
|
||||||
|
#include "geofence_no_aprs.h"
|
||||||
|
|
||||||
|
int32_t current_no_telem_outline = -1;
|
||||||
|
|
||||||
int32_t current_aprs_zone = -2, current_aprs_zone_outline = -2;
|
int32_t current_aprs_zone = -2, current_aprs_zone_outline = -2;
|
||||||
|
|
||||||
int32_t current_no_telem_outline = -1;
|
|
||||||
|
|
||||||
#define polyX(i) (poly[(i*2)+0])
|
#define polyX(i) (poly[(i*2)+0])
|
||||||
#define polyY(i) (poly[(i*2)+1])
|
#define polyY(i) (poly[(i*2)+1])
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -25,8 +25,8 @@
|
||||||
" print >>f, \"\"\n",
|
" print >>f, \"\"\n",
|
||||||
" \n",
|
" \n",
|
||||||
"def header_h_aprs(header, zones):\n",
|
"def header_h_aprs(header, zones):\n",
|
||||||
" print >>header, \"#ifndef GEOFENCE_APRS_H\"\n",
|
" print >>header, \"#ifndef GEOFENCE_APRS_ZONES_H\"\n",
|
||||||
" print >>header, \"#define GEOFENCE_APRS_H\"\n",
|
" print >>header, \"#define GEOFENCE_APRS_ZONES_H\"\n",
|
||||||
" print >>header, \"\"\n",
|
" print >>header, \"\"\n",
|
||||||
" print >>header, \"\"\n",
|
" print >>header, \"\"\n",
|
||||||
" print >>header, \"#include <stdbool.h>\"\n",
|
" print >>header, \"#include <stdbool.h>\"\n",
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
" print >>header, \"\"\n",
|
" print >>header, \"\"\n",
|
||||||
" print >>header, \"const struct aprs_zone_t aprs_zones[{0}];\".format(len(zones))\n",
|
" print >>header, \"const struct aprs_zone_t aprs_zones[{0}];\".format(len(zones))\n",
|
||||||
" print >>header, \"\"\n",
|
" print >>header, \"\"\n",
|
||||||
" print >>header, \"#endif /* GEOFENCE_APRS_H */\""
|
" print >>header, \"#endif /* GEOFENCE_APRS_ZONES_H */\""
|
||||||
],
|
],
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
|
@ -131,20 +131,20 @@
|
||||||
"input": [
|
"input": [
|
||||||
"def write_aprs_zones(aprs_zones):\n",
|
"def write_aprs_zones(aprs_zones):\n",
|
||||||
" # header\n",
|
" # header\n",
|
||||||
" header = open('../../firmware/inc/geofence_aprs.h','w')\n",
|
" header = open('../../firmware/inc/geofence_aprs_zones.h','w')\n",
|
||||||
"\n",
|
"\n",
|
||||||
" file_header_aprs(header)\n",
|
" file_header_aprs(header)\n",
|
||||||
" header_h_aprs(header, aprs_zones)\n",
|
" header_h_aprs(header, aprs_zones)\n",
|
||||||
"\n",
|
"\n",
|
||||||
" # source\n",
|
" # source\n",
|
||||||
" source = open('../../firmware/src/geofence_aprs.c', 'w')\n",
|
" source = open('../../firmware/src/geofence_aprs_zones.c', 'w')\n",
|
||||||
"\n",
|
"\n",
|
||||||
" file_header_aprs(source)\n",
|
" file_header_aprs(source)\n",
|
||||||
" print >>source, \"\"\n",
|
" print >>source, \"\"\n",
|
||||||
" print >>source, \"#include <stdbool.h>\"\n",
|
" print >>source, \"#include <stdbool.h>\"\n",
|
||||||
" print >>source, \"\"\n",
|
" print >>source, \"\"\n",
|
||||||
" print >>source, \"#include \\\"samd20.h\\\"\"\n",
|
" print >>source, \"#include \\\"samd20.h\\\"\"\n",
|
||||||
" print >>source, \"#include \\\"geofence_aprs.h\\\"\"\n",
|
" print >>source, \"#include \\\"geofence_aprs_zones.h\\\"\"\n",
|
||||||
" print >>source, \"\"\n",
|
" print >>source, \"\"\n",
|
||||||
" print >>source, \"\"\n",
|
" print >>source, \"\"\n",
|
||||||
" print >>source, \"/* Longitude, Latitude */\"\n",
|
" print >>source, \"/* Longitude, Latitude */\"\n",
|
||||||
|
@ -158,7 +158,7 @@
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"prompt_number": 11
|
"prompt_number": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
|
Ładowanie…
Reference in New Issue