split callsigns into a separate file

main-solar-only
Richard Meadows 2016-08-07 12:32:08 +01:00
rodzic 0d63bc3e06
commit 06bf01b3a5
5 zmienionych plików z 83 dodań i 34 usunięć

6
firmware/.gitignore vendored
Wyświetl plik

@ -11,6 +11,7 @@ out/
# Intermediate compilation files
*.o
*.d
# raw backlog data
tools/aprs/rawdata/*rawdata.txt
@ -31,4 +32,7 @@ tools/verification/ctypesgen
*.pyc
# Compile commands
compile_commands.json
compile_commands.json
# Callsigns header
inc/callsigns.h

Wyświetl plik

@ -6,6 +6,12 @@ by whatever means possible, come hell or high water.
(Actually, come low temperatures, long paths, geopolitical
restrictions, low power etc.)
## Callsigns
You'll need to copy
[inc/callsigns_template.h](inc/callsigns_template.h) to
inc/callsigns.h and update it with your own callsigns.
## Technical Description ##
The firmware is written in C and targeted at the highly configurable

Wyświetl plik

@ -27,46 +27,18 @@
#include <string.h>
#include "data.h"
#include "callsigns.h"
/**
* Reference APRS Protocol Spec http://www.aprs.org/doc/APRS101.PDF
*/
#define APRS_FLIGHT_PARAMS
#ifdef APRS_FLIGHT_PARAMS /* ----------- Parameters for flight */
/**
* This should return a full licensed callsign you own.
*
* Max. 6 characters
*/
static inline char* aprs_callsign(char* call) {
(void)call;
return "QQQ";
}
/**
* SSID. Usually 11 for balloons
*/
#ifndef APRS_SSID
#define APRS_SSID 11
#endif
/**
* APRS Map Symbol. See Appendix 2: APRS Symbol Tables
*/
#ifndef APRS_SYMBOL
#define APRS_SYMBOL "/O" /* Balloon */
#else /* ----------- Parameters for testing */
#warning Using APRS test parameters
static inline char* aprs_callsign(char* call) {
(void)call;
return "QQQ";
}
#define APRS_SSID 2
#define APRS_SYMBOL "/2"
#endif

Wyświetl plik

@ -0,0 +1,61 @@
/*
* Template for callsign configuration file
* Copyright (C) 2016 Richard Meadows <richardeoin>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef CALLSIGNS_H
#define CALLSIGNS_H
/* ------------------------------- Telemetry -------------------------------- */
#define CALLSIGN "YOUR_CALL"
/* ---------------------------------- APRS ---------------------------------- */
/**
* This should return a full licensed callsign you own.
*
* Maximum 6 characters
*/
static inline char* aprs_callsign(char* call)
{
return "QQQ";
}
/**
* SSID. Usually 11 for balloons
*/
#define APRS_SSID 11
/**
* APRS Map Symbol. See Appendix 2: APRS Symbol Tables
*/
#define APRS_SYMBOL "/O" /* Balloon */
/**
* APRS Comment Field
*/
#define APRS_COMMENT ""
/* -------------------------------------------------------------------------- */
#endif /* CALLSIGNS_H */

Wyświetl plik

@ -47,9 +47,15 @@
#include "rtc.h"
#include "sequencer.h"
#include "thermistor.h"
#include "callsigns.h"
#define CALLSIGN "UBSEDS16"
#ifndef CALLSIGN
#define CALLSIGN "QQQ"
#endif
#ifndef APRS_COMMENT
#define APRS_COMMENT ""
#endif
/**
* Formats a UKHAS telemetry string for the given datapoint