kopia lustrzana https://github.com/DL7AD/pecanpico10
Adusted frequency naming
rodzic
68a257cab3
commit
1ff0ed604e
|
@ -13,21 +13,21 @@ const conf_t conf_flash_default = {
|
||||||
// Primary position app
|
// Primary position app
|
||||||
.pos_pri = {
|
.pos_pri = {
|
||||||
.beacon = {
|
.beacon = {
|
||||||
.active = false,
|
.active = true,
|
||||||
.cycle = TIME_S2I(60 * 5),
|
.cycle = TIME_S2I(120),
|
||||||
.init_delay = TIME_S2I(60),
|
.init_delay = TIME_S2I(0),
|
||||||
.fixed = false // Add lat, lon, alt fields when enabling fixed
|
.fixed = false // Add lat, lon, alt fields when enabling fixed
|
||||||
},
|
},
|
||||||
.radio_conf = {
|
.radio_conf = {
|
||||||
.pwr = 0x1F,
|
.pwr = 0x7F,
|
||||||
.freq = 144800000,
|
.freq = FREQ_GEOFENCE,
|
||||||
.mod = MOD_2FSK,
|
.mod = MOD_AFSK,
|
||||||
.cca = 0x4F,
|
.cca = 0x5F,
|
||||||
},
|
},
|
||||||
// App identity
|
// App identity
|
||||||
.call = "VK2GJ-12",
|
.call = "DL7AD-15",
|
||||||
.path = "WIDE1-1",
|
.path = "WIDE1-1",
|
||||||
.symbol = SYM_ANTENNA,
|
.symbol = SYM_BALLOON,
|
||||||
.aprs_msg = true, // Enable APRS message reception on this app
|
.aprs_msg = true, // Enable APRS message reception on this app
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -44,12 +44,12 @@ const conf_t conf_flash_default = {
|
||||||
},
|
},
|
||||||
.radio_conf = {
|
.radio_conf = {
|
||||||
.pwr = 0x7F,
|
.pwr = 0x7F,
|
||||||
.freq = FREQ_APRS_RECEIVE,
|
.freq = FREQ_GEOFENCE,
|
||||||
.mod = MOD_AFSK,
|
.mod = MOD_AFSK,
|
||||||
.cca = 0x4F
|
.cca = 0x4F
|
||||||
},
|
},
|
||||||
// App identity
|
// App identity
|
||||||
.call = "VK2GJ-5",
|
.call = "DL7AD-5",
|
||||||
.path = "WIDE2-1",
|
.path = "WIDE2-1",
|
||||||
.symbol = SYM_DIGIPEATER,
|
.symbol = SYM_DIGIPEATER,
|
||||||
.aprs_msg = false, // Enable APRS message reception on this app
|
.aprs_msg = false, // Enable APRS message reception on this app
|
||||||
|
@ -58,26 +58,26 @@ const conf_t conf_flash_default = {
|
||||||
// Primary image app
|
// Primary image app
|
||||||
.img_pri = {
|
.img_pri = {
|
||||||
.svc_conf = {
|
.svc_conf = {
|
||||||
.active = false,
|
.active = true,
|
||||||
.cycle = TIME_S2I(60 * 5),
|
.cycle = CYCLE_CONTINUOUSLY,
|
||||||
.init_delay = TIME_S2I(60 * 1),
|
.init_delay = TIME_S2I(30),
|
||||||
.send_spacing = TIME_S2I(5)
|
.send_spacing = TIME_S2I(10)
|
||||||
},
|
},
|
||||||
.radio_conf = {
|
.radio_conf = {
|
||||||
.pwr = 0x7F,
|
.pwr = 0x7F,
|
||||||
.freq = 144800000,
|
.freq = FREQ_GEOFENCE,
|
||||||
.mod = MOD_2FSK,
|
.mod = MOD_AFSK,
|
||||||
.cca = 0x4F
|
.cca = 0x5F
|
||||||
|
|
||||||
},
|
},
|
||||||
// App identity
|
// App identity
|
||||||
.call = "VK2GJ-15",
|
.call = "DL7AD-15",
|
||||||
.path = "",
|
.path = "",
|
||||||
|
|
||||||
// Image settings
|
// Image settings
|
||||||
.res = RES_VGA,
|
.res = RES_QVGA,
|
||||||
.quality = 4,
|
.quality = 4,
|
||||||
.buf_size = 40 * 1024,
|
.buf_size = 50 * 1024,
|
||||||
.redundantTx = false
|
.redundantTx = false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -91,12 +91,12 @@ const conf_t conf_flash_default = {
|
||||||
},
|
},
|
||||||
.radio_conf = {
|
.radio_conf = {
|
||||||
.pwr = 0x1F,
|
.pwr = 0x1F,
|
||||||
.freq = APRS_FREQ_AUSTRALIA,
|
.freq = FREQ_APRS_AUSTRALIA,
|
||||||
.mod = MOD_AFSK,
|
.mod = MOD_AFSK,
|
||||||
.cca = 0x4F
|
.cca = 0x4F
|
||||||
},
|
},
|
||||||
// App identity
|
// App identity
|
||||||
.call = "VK2GJ-12",
|
.call = "DL7AD-12",
|
||||||
.path = "",
|
.path = "",
|
||||||
|
|
||||||
// Image settings
|
// Image settings
|
||||||
|
@ -115,12 +115,12 @@ const conf_t conf_flash_default = {
|
||||||
},
|
},
|
||||||
.radio_conf = {
|
.radio_conf = {
|
||||||
.pwr = 0x7F,
|
.pwr = 0x7F,
|
||||||
.freq = FREQ_APRS_DYNAMIC,
|
.freq = FREQ_GEOFENCE,
|
||||||
.mod = MOD_AFSK,
|
.mod = MOD_AFSK,
|
||||||
.cca = 0x4F
|
.cca = 0x4F
|
||||||
},
|
},
|
||||||
// Node identity
|
// Node identity
|
||||||
.call = "VK2GJ-13",
|
.call = "DL7AD-13",
|
||||||
.path = "WIDE1-1",
|
.path = "WIDE1-1",
|
||||||
.density = 10
|
.density = 10
|
||||||
},
|
},
|
||||||
|
@ -132,31 +132,31 @@ const conf_t conf_flash_default = {
|
||||||
.svc_conf = {
|
.svc_conf = {
|
||||||
// The packet receive service is enabled if true
|
// The packet receive service is enabled if true
|
||||||
// Receive is paused and resumed by transmission
|
// Receive is paused and resumed by transmission
|
||||||
.active = true,
|
.active = false,
|
||||||
.init_delay = TIME_S2I(20)
|
.init_delay = TIME_S2I(20)
|
||||||
},
|
},
|
||||||
// Receive radio configuration
|
// Receive radio configuration
|
||||||
.radio_conf = {
|
.radio_conf = {
|
||||||
.freq = FREQ_APRS_DYNAMIC,
|
.freq = FREQ_GEOFENCE,
|
||||||
.mod = MOD_AFSK,
|
.mod = MOD_AFSK,
|
||||||
.rssi = 0x3F
|
.rssi = 0x3F
|
||||||
},
|
},
|
||||||
// APRS identity used in message responses if digipeat is not enabled
|
// APRS identity used in message responses if digipeat is not enabled
|
||||||
.call = "VK2GJ-4",
|
.call = "DL7AD-4",
|
||||||
.symbol = SYM_ANTENNA
|
.symbol = SYM_ANTENNA
|
||||||
},
|
},
|
||||||
.aprs_msg = false, // Set true to enable messages to be accepted on RX call sign
|
.aprs_msg = false, // Set true to enable messages to be accepted on RX call sign
|
||||||
.digi = true,
|
.digi = false,
|
||||||
.tx = {
|
.tx = {
|
||||||
// Transmit radio configuration
|
// Transmit radio configuration
|
||||||
.radio_conf = {
|
.radio_conf = {
|
||||||
.freq = FREQ_APRS_RECEIVE,
|
.freq = FREQ_RX_APRS,
|
||||||
.pwr = 0x7F,
|
.pwr = 0x7F,
|
||||||
.mod = MOD_AFSK,
|
.mod = MOD_AFSK,
|
||||||
.cca = 0x4F
|
.cca = 0x4F
|
||||||
},
|
},
|
||||||
// Digipeat transmission identity
|
// Digipeat transmission identity
|
||||||
.call = "VK2GJ-5",
|
.call = "DL7AD-5",
|
||||||
.path = "WIDE2-1",
|
.path = "WIDE2-1",
|
||||||
.symbol = SYM_DIGIPEATER,
|
.symbol = SYM_DIGIPEATER,
|
||||||
// A digipeater beacon can be added using one of the POS apps
|
// A digipeater beacon can be added using one of the POS apps
|
||||||
|
@ -183,13 +183,13 @@ const conf_t conf_flash_default = {
|
||||||
.tel_enc_cycle = TIME_S2I(60 * 60 * 2),
|
.tel_enc_cycle = TIME_S2I(60 * 60 * 2),
|
||||||
|
|
||||||
// The default APRS frequency when geofence is not resolved
|
// The default APRS frequency when geofence is not resolved
|
||||||
.freq = APRS_FREQ_AUSTRALIA,
|
.freq = FREQ_APRS_EUROPE,
|
||||||
|
|
||||||
// The base station identity.
|
// The base station identity.
|
||||||
.base = {
|
.base = {
|
||||||
// If enabled tracker initiated APRS messages are addressed to this call sign
|
// If enabled tracker initiated APRS messages are addressed to this call sign
|
||||||
.enabled = true,
|
.enabled = false,
|
||||||
.call = "VK2GJ-7",
|
.call = "DL7AD-7",
|
||||||
.path = "WIDE2-1",
|
.path = "WIDE2-1",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -6,22 +6,22 @@
|
||||||
#include "ublox.h"
|
#include "ublox.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FREQ_RADIO_INVALID = 0,
|
FREQ_INVALID = 0,
|
||||||
FREQ_APRS_DYNAMIC, /* Geofencing frequency (144.8 default). */
|
FREQ_APRS_GEOFENCE, /* Geofencing frequency (144.8 default). */
|
||||||
FREQ_APRS_SCAN, /* Frequency last found in RX scan. - TBI */
|
FREQ_SCAN, /* Frequency last found in RX scan. - TBI */
|
||||||
FREQ_APRS_RECEIVE, /* Active RX frequency - fall back to DYNAMIC. */
|
FREQ_RX_APRS, /* Active RX frequency - fall back to DYNAMIC. */
|
||||||
FREQ_CMDC_RECEIVE, /* Frequency used for command and control. TBI */
|
FREQ_RX_CMDC, /* Frequency used for command and control. TBI */
|
||||||
FREQ_APRS_DEFAULT, /* Default frequency specified in configuration */
|
FREQ_DEFAULT, /* Default frequency specified in configuration */
|
||||||
FREQ_CODES_END
|
FREQ_CODES_END
|
||||||
} freq_codes_t;
|
} freq_codes_t;
|
||||||
|
|
||||||
#define FREQ_RADIO_INVALID 0
|
#define FREQ_INVALID 0
|
||||||
#define FREQ_APRS_DYNAMIC 1 /* Geofencing frequency (144.8 default). */
|
#define FREQ_GEOFENCE 1 /* Geofencing frequency (144.8 default). */
|
||||||
#define FREQ_APRS_SCAN 2 /* Frequency based on band base + channel scan. */
|
#define FREQ_SCAN 2 /* Frequency based on band base + channel scan. */
|
||||||
#define FREQ_APRS_RECEIVE 3 /* Active RX frequency - fall back to DYNAMIC. */
|
#define FREQ_RX_APRS 3 /* Active RX frequency - fall back to DYNAMIC. */
|
||||||
#define FREQ_CMDC_RECEIVE 4 /* Frequency used for command and control. TBI */
|
#define FREQ_RX_CMDC 4 /* Frequency used for command and control. TBI */
|
||||||
#define FREQ_APRS_DEFAULT 5 /* Default frequency specified in configuration */
|
#define FREQ_DEFAULT 5 /* Default frequency specified in configuration */
|
||||||
#define FREQ_CODES_END 6
|
#define FREQ_CODES_END 6
|
||||||
|
|
||||||
#define CYCLE_CONTINUOUSLY 0
|
#define CYCLE_CONTINUOUSLY 0
|
||||||
|
|
||||||
|
|
|
@ -986,7 +986,7 @@ static bool Si446x_transmit(const radio_unit_t radio,
|
||||||
radio_freq_t op_freq = pktComputeOperatingFrequency(radio, freq,
|
radio_freq_t op_freq = pktComputeOperatingFrequency(radio, freq,
|
||||||
step, chan, RADIO_TX);
|
step, chan, RADIO_TX);
|
||||||
|
|
||||||
if(op_freq == FREQ_RADIO_INVALID) {
|
if(op_freq == FREQ_INVALID) {
|
||||||
TRACE_ERROR("SI > Frequency out of range");
|
TRACE_ERROR("SI > Frequency out of range");
|
||||||
TRACE_ERROR("SI > abort transmission");
|
TRACE_ERROR("SI > abort transmission");
|
||||||
return false;
|
return false;
|
||||||
|
@ -1068,7 +1068,7 @@ bool Si446x_receiveNoLock(const radio_unit_t radio,
|
||||||
radio_freq_t op_freq = pktComputeOperatingFrequency(radio, freq,
|
radio_freq_t op_freq = pktComputeOperatingFrequency(radio, freq,
|
||||||
step, channel,
|
step, channel,
|
||||||
RADIO_RX);
|
RADIO_RX);
|
||||||
if(op_freq == FREQ_RADIO_INVALID) {
|
if(op_freq == FREQ_INVALID) {
|
||||||
TRACE_ERROR("SI > Frequency out of range");
|
TRACE_ERROR("SI > Frequency out of range");
|
||||||
TRACE_ERROR("SI > abort transmission");
|
TRACE_ERROR("SI > abort transmission");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -648,55 +648,50 @@ static bool isPointInBrazil(int32_t lat, int32_t lon) {
|
||||||
return isPointInPolygon(brazil, sizeof(brazil)/sizeof(brazil[0]), lat, lon);
|
return isPointInPolygon(brazil, sizeof(brazil)/sizeof(brazil[0]), lat, lon);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns APRS region specific frequency determined by GPS location. It will
|
|
||||||
* use the APRS default frequency set in the config file if no GPS fix has
|
|
||||||
* been received.
|
|
||||||
*/
|
|
||||||
uint32_t getAPRSRegionFrequency() {
|
uint32_t getAPRSRegionFrequency() {
|
||||||
dataPoint_t *point = getLastDataPoint();
|
dataPoint_t *point = getLastDataPoint();
|
||||||
|
|
||||||
// Position unknown
|
// Position unknown
|
||||||
if(point == NULL || (point->gps_lat == 0 && point->gps_lon == 0))
|
if(point == NULL || (point->gps_lat == 0 && point->gps_lon == 0))
|
||||||
// Return code and let pktradio figure out what to do.
|
// Return code and let pktradio figure out what to do.
|
||||||
return FREQ_APRS_DEFAULT;
|
return FREQ_INVALID;
|
||||||
|
|
||||||
// America 144.390 MHz
|
// America 144.390 MHz
|
||||||
if(isPointInAmerica(point->gps_lat, point->gps_lon))
|
if(isPointInAmerica(point->gps_lat, point->gps_lon))
|
||||||
return APRS_FREQ_AMERICA;
|
return FREQ_APRS_AMERICA;
|
||||||
|
|
||||||
// China 144.640 MHz
|
// China 144.640 MHz
|
||||||
if(isPointInChina(point->gps_lat, point->gps_lon))
|
if(isPointInChina(point->gps_lat, point->gps_lon))
|
||||||
return APRS_FREQ_CHINA;
|
return FREQ_APRS_CHINA;
|
||||||
|
|
||||||
// Japan 144.660 MHz
|
// Japan 144.660 MHz
|
||||||
if(isPointInJapan(point->gps_lat, point->gps_lon))
|
if(isPointInJapan(point->gps_lat, point->gps_lon))
|
||||||
return APRS_FREQ_JAPAN;
|
return FREQ_APRS_JAPAN;
|
||||||
|
|
||||||
// Southkorea 144.620 MHz
|
// Southkorea 144.620 MHz
|
||||||
if(isPointInSouthkorea(point->gps_lat, point->gps_lon))
|
if(isPointInSouthkorea(point->gps_lat, point->gps_lon))
|
||||||
return APRS_FREQ_SOUTHKOREA;
|
return FREQ_APRS_SOUTHKOREA;
|
||||||
|
|
||||||
// Southkorea 144.620 MHz
|
// Southkorea 144.620 MHz
|
||||||
if(isPointInSoutheastAsia(point->gps_lat, point->gps_lon))
|
if(isPointInSoutheastAsia(point->gps_lat, point->gps_lon))
|
||||||
return APRS_FREQ_SOUTHEASTASIA;
|
return FREQ_APRS_SOUTHEASTASIA;
|
||||||
|
|
||||||
// Australia 145.175 MHz
|
// Australia 145.175 MHz
|
||||||
if(isPointInAustralia(point->gps_lat, point->gps_lon))
|
if(isPointInAustralia(point->gps_lat, point->gps_lon))
|
||||||
return APRS_FREQ_AUSTRALIA;
|
return FREQ_APRS_AUSTRALIA;
|
||||||
|
|
||||||
// Australia 144.575 MHz
|
// Australia 144.575 MHz
|
||||||
if(isPointInNewZealand(point->gps_lat, point->gps_lon))
|
if(isPointInNewZealand(point->gps_lat, point->gps_lon))
|
||||||
return APRS_FREQ_NEWZEALAND;
|
return FREQ_APRS_NEWZEALAND;
|
||||||
|
|
||||||
// Argentina/Paraguay/Uruguay 144.930 MHz
|
// Argentina/Paraguay/Uruguay 144.930 MHz
|
||||||
if(isPointInArgentina(point->gps_lat, point->gps_lon))
|
if(isPointInArgentina(point->gps_lat, point->gps_lon))
|
||||||
return APRS_FREQ_ARGENTINA;
|
return FREQ_APRS_ARGENTINA;
|
||||||
|
|
||||||
// Brazil 145.575 MHz
|
// Brazil 145.575 MHz
|
||||||
if(isPointInBrazil(point->gps_lat, point->gps_lon))
|
if(isPointInBrazil(point->gps_lat, point->gps_lon))
|
||||||
return APRS_FREQ_BRAZIL;
|
return FREQ_APRS_BRAZIL;
|
||||||
|
|
||||||
return FREQ_APRS_DEFAULT;
|
return FREQ_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,16 +6,16 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
// APRS region frequencies
|
// APRS region frequencies
|
||||||
#define APRS_FREQ_OTHER 144800000
|
#define FREQ_APRS_EUROPE 144800000
|
||||||
#define APRS_FREQ_AMERICA 144390000
|
#define FREQ_APRS_AMERICA 144390000
|
||||||
#define APRS_FREQ_CHINA 144640000
|
#define FREQ_APRS_CHINA 144640000
|
||||||
#define APRS_FREQ_JAPAN 144660000
|
#define FREQ_APRS_JAPAN 144660000
|
||||||
#define APRS_FREQ_SOUTHKOREA 144620000
|
#define FREQ_APRS_SOUTHKOREA 144620000
|
||||||
#define APRS_FREQ_SOUTHEASTASIA 144390000
|
#define FREQ_APRS_SOUTHEASTASIA 144390000
|
||||||
#define APRS_FREQ_AUSTRALIA 145175000
|
#define FREQ_APRS_AUSTRALIA 145175000
|
||||||
#define APRS_FREQ_NEWZEALAND 144575000
|
#define FREQ_APRS_NEWZEALAND 144575000
|
||||||
#define APRS_FREQ_ARGENTINA 144930000
|
#define FREQ_APRS_ARGENTINA 144930000
|
||||||
#define APRS_FREQ_BRAZIL 145575000
|
#define FREQ_APRS_BRAZIL 145575000
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t lat;
|
int32_t lat;
|
||||||
|
|
|
@ -672,27 +672,27 @@ uint8_t pktGetNumRadios(void) {
|
||||||
int pktDisplayFrequencyCode(const radio_freq_t code, char *buf, size_t size) {
|
int pktDisplayFrequencyCode(const radio_freq_t code, char *buf, size_t size) {
|
||||||
char* str = NULL;
|
char* str = NULL;
|
||||||
switch(code) {
|
switch(code) {
|
||||||
case FREQ_RADIO_INVALID:
|
case FREQ_INVALID:
|
||||||
str = "No Code";
|
str = "No Code";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FREQ_APRS_DYNAMIC:
|
case FREQ_GEOFENCE:
|
||||||
str = "APRS Dynamic frequency";
|
str = "APRS Dynamic frequency";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FREQ_APRS_SCAN:
|
case FREQ_SCAN:
|
||||||
str = "APRS Scan channel";
|
str = "APRS Scan channel";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FREQ_APRS_RECEIVE:
|
case FREQ_RX_APRS:
|
||||||
str = "APRS Receive frequency";
|
str = "APRS Receive frequency";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FREQ_CMDC_RECEIVE:
|
case FREQ_RX_CMDC:
|
||||||
str = "CNC Receive frequency";
|
str = "CNC Receive frequency";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FREQ_APRS_DEFAULT:
|
case FREQ_DEFAULT:
|
||||||
str = "APRS Default frequency";
|
str = "APRS Default frequency";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -719,7 +719,7 @@ int pktDisplayFrequencyCode(const radio_freq_t code, char *buf, size_t size) {
|
||||||
* @param[in] radio Radio unit ID.
|
* @param[in] radio Radio unit ID.
|
||||||
*
|
*
|
||||||
* @return operating frequency
|
* @return operating frequency
|
||||||
* @retval FREQ_RADIO_INVALID if radio ID is invalid
|
* @retval FREQ_INVALID if radio ID is invalid
|
||||||
* @retval Default frequency otherwise
|
* @retval Default frequency otherwise
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
|
@ -855,7 +855,7 @@ const radio_config_t *pktGetRadioData(radio_unit_t radio) {
|
||||||
*
|
*
|
||||||
* @return operating frequency in Hz.
|
* @return operating frequency in Hz.
|
||||||
* @retval an absolute operating frequency in Hz.
|
* @retval an absolute operating frequency in Hz.
|
||||||
* @retval FREQ_RADIO_INVALID if frequency or radio ID is invalid.
|
* @retval FREQ_INVALID if frequency or radio ID is invalid.
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
@ -865,7 +865,7 @@ radio_freq_t pktComputeOperatingFrequency(const radio_unit_t radio,
|
||||||
radio_ch_t chan,
|
radio_ch_t chan,
|
||||||
const radio_mode_t mode) {
|
const radio_mode_t mode) {
|
||||||
|
|
||||||
if((base_freq == FREQ_APRS_RECEIVE || base_freq == FREQ_APRS_SCAN)
|
if((base_freq == FREQ_RX_APRS || base_freq == FREQ_SCAN)
|
||||||
&& (mode == RADIO_TX || mode == RADIO_ALL)) {
|
&& (mode == RADIO_TX || mode == RADIO_ALL)) {
|
||||||
/* Get current RX frequency (or default) and use that. */
|
/* Get current RX frequency (or default) and use that. */
|
||||||
step = 0;
|
step = 0;
|
||||||
|
@ -878,7 +878,7 @@ radio_freq_t pktComputeOperatingFrequency(const radio_unit_t radio,
|
||||||
* Check for dynamic frequency determination.
|
* Check for dynamic frequency determination.
|
||||||
* Dynamic can return an absolute frequency or a further special code.
|
* Dynamic can return an absolute frequency or a further special code.
|
||||||
*/
|
*/
|
||||||
if(base_freq == FREQ_APRS_DYNAMIC) {
|
if(base_freq == FREQ_GEOFENCE) {
|
||||||
/*
|
/*
|
||||||
* Get frequency by geofencing.
|
* Get frequency by geofencing.
|
||||||
* Geofencing can return special code FREQ_APRS_DEFAULT.
|
* Geofencing can return special code FREQ_APRS_DEFAULT.
|
||||||
|
@ -888,8 +888,7 @@ radio_freq_t pktComputeOperatingFrequency(const radio_unit_t radio,
|
||||||
chan = 0;
|
chan = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for default. */
|
if(base_freq == FREQ_INVALID) { // Geofence not resolved
|
||||||
if(base_freq == FREQ_APRS_DEFAULT) {
|
|
||||||
base_freq = pktGetDefaultOperatingFrequency(radio);
|
base_freq = pktGetDefaultOperatingFrequency(radio);
|
||||||
step = 0;
|
step = 0;
|
||||||
chan = 0;
|
chan = 0;
|
||||||
|
@ -901,7 +900,7 @@ radio_freq_t pktComputeOperatingFrequency(const radio_unit_t radio,
|
||||||
if(pktCheckAllowedFrequency(radio, op_freq) != NULL) {
|
if(pktCheckAllowedFrequency(radio, op_freq) != NULL) {
|
||||||
return op_freq;
|
return op_freq;
|
||||||
}
|
}
|
||||||
return FREQ_RADIO_INVALID;
|
return FREQ_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -70,8 +70,8 @@ void start_aprs_threads(radio_unit_t radio, radio_freq_t base_freq,
|
||||||
channel_hz_t step,
|
channel_hz_t step,
|
||||||
radio_ch_t chan, radio_squelch_t rssi) {
|
radio_ch_t chan, radio_squelch_t rssi) {
|
||||||
|
|
||||||
if(base_freq == FREQ_APRS_RECEIVE) {
|
if(base_freq == FREQ_RX_APRS) {
|
||||||
TRACE_ERROR("RX > Cannot specify FREQ_APRS_RECEIVE for receiver");
|
TRACE_ERROR("RX > Cannot specify FREQ_RX_APRS for receiver");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ bool transmitOnRadio(packet_t pp, const radio_freq_t base_freq,
|
||||||
step,
|
step,
|
||||||
chan,
|
chan,
|
||||||
RADIO_TX);
|
RADIO_TX);
|
||||||
if(op_freq == FREQ_RADIO_INVALID) {
|
if(op_freq == FREQ_INVALID) {
|
||||||
TRACE_ERROR("RAD > Transmit operating frequency of %d.%03d MHz is invalid",
|
TRACE_ERROR("RAD > Transmit operating frequency of %d.%03d MHz is invalid",
|
||||||
op_freq/1000000, (op_freq%1000000)/1000);
|
op_freq/1000000, (op_freq%1000000)/1000);
|
||||||
pktReleaseBufferChain(pp);
|
pktReleaseBufferChain(pp);
|
||||||
|
|
Ładowanie…
Reference in New Issue