kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
Update DFM decoder from upstream repo, fix APRS DFM callsign to match dxlAPRS.
rodzic
b9e6fb8ada
commit
3232e1198d
|
@ -41,9 +41,14 @@ def telemetry_to_aprs_position(sonde_data, object_name="<id>", aprs_comment="BOM
|
|||
_object_name = sonde_data["id"].strip()
|
||||
elif sonde_data['type'] == 'DFM':
|
||||
# The DFM sonde IDs are too long to use directly.
|
||||
# Grab the last six digits of the sonde ID (which is the serial number)
|
||||
# TODO: Align this with whatever other decoders do.
|
||||
_id_suffix = sonde_data['id'][-6:]
|
||||
|
||||
# Split out just the serial number part of the ID, and cast it to an int
|
||||
_dfm_id = int(sonde_data['id'].split('-')[-1])
|
||||
|
||||
# Convert to upper-case hex, and take the last 5 nibbles.
|
||||
_id_suffix = hex(_dfm_id).upper()[-5:]
|
||||
|
||||
# Append the hex ID to a shortened sonde-type.
|
||||
if "DFM09" in sonde_data['id']:
|
||||
_object_name = "DF9" + _id_suffix
|
||||
sonde_data['type'] = 'DFM09'
|
||||
|
|
|
@ -452,9 +452,13 @@ static int conf_out(gpx_t *gpx, ui8_t *conf_bits, int ec) {
|
|||
gpx->snc.max_ch = conf_id;
|
||||
}
|
||||
|
||||
if (conf_id > 4 && conf_id > gpx->snc.max_ch) gpx->snc.max_ch = conf_id; // mind. 5 Kanaele // reset? lower 0xsCaaaab?
|
||||
if (conf_id > 4 && conf_id > gpx->snc.max_ch && ec == 0) { // mind. 5 Kanaele
|
||||
if (bits2val(conf_bits+4, 4) == 0xC) { // 0xsCaaaab
|
||||
gpx->snc.max_ch = conf_id; // reset?
|
||||
}
|
||||
}
|
||||
|
||||
if (conf_id > 4 && conf_id == (gpx->snc.nul_ch>>4)+1)
|
||||
if (conf_id > 4 && (conf_id == (gpx->snc.nul_ch>>4)+1 || conf_id == gpx->snc.max_ch))
|
||||
{
|
||||
sn2_ch = bits2val(conf_bits, 8);
|
||||
sn_ch = ((sn2_ch>>4) & 0xF);
|
||||
|
|
Ładowanie…
Reference in New Issue