kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
rebase rs41mod, change field name for subframe data
rodzic
3ca10ea536
commit
58feaebf9c
|
@ -1710,15 +1710,15 @@ class SondeDecoder(object):
|
||||||
|
|
||||||
# RS41 Subframe Data Actions
|
# RS41 Subframe Data Actions
|
||||||
# We only upload the subframe data once.
|
# We only upload the subframe data once.
|
||||||
if 'rs41_calconf320' in _telemetry:
|
if 'rs41_calconf51x16' in _telemetry:
|
||||||
# Remove subframe data if we have already uploaded it once.
|
# Remove subframe data if we have already uploaded it once.
|
||||||
if _telemetry['id'] in self.rs41_subframe_uploads:
|
if _telemetry['id'] in self.rs41_subframe_uploads:
|
||||||
_telemetry.pop('rs41_calconf320')
|
_telemetry.pop('rs41_calconf51x16')
|
||||||
else:
|
else:
|
||||||
self.rs41_subframe_uploads.append(_telemetry['id'])
|
self.rs41_subframe_uploads.append(_telemetry['id'])
|
||||||
self.log_info(f"Received complete calibration dataset for {_telemetry['id']}.")
|
self.log_info(f"Received complete calibration dataset for {_telemetry['id']}.")
|
||||||
_telemetry['rs41_subframe'] = _telemetry['rs41_calconf320']
|
_telemetry['rs41_subframe'] = _telemetry['rs41_calconf51x16']
|
||||||
_telemetry.pop('rs41_calconf320')
|
_telemetry.pop('rs41_calconf51x16')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2132,9 +2132,16 @@ static int print_position(gpx_t *gpx, int ec) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gpx->option.cal == 1) { // cal/conf
|
if (gpx->option.cal == 1) { // cal/conf
|
||||||
|
int _j;
|
||||||
if ( !gpx->calconf_sent && gpx->calconf_complete ) {
|
if ( !gpx->calconf_sent && gpx->calconf_complete ) {
|
||||||
fprintf(stdout, ", \"rs41_calconf320\": \"");
|
/*
|
||||||
for (int _j = 0; _j < 51*16; _j++) {
|
fprintf(stdout, ", \"rs41_calconf320h\": \""); // only constant/crc part
|
||||||
|
for (int _j = 0; _j < 50*16; _j++) {
|
||||||
|
fprintf(stdout, "%02X", gpx->calibytes[_j]);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
fprintf(stdout, ", \"rs41_calconf51x16\": \"");
|
||||||
|
for (_j = 0; _j < 51*16; _j++) {
|
||||||
fprintf(stdout, "%02X", gpx->calibytes[_j]);
|
fprintf(stdout, "%02X", gpx->calibytes[_j]);
|
||||||
}
|
}
|
||||||
fprintf(stdout, "\"");
|
fprintf(stdout, "\"");
|
||||||
|
@ -2142,15 +2149,16 @@ static int print_position(gpx_t *gpx, int ec) {
|
||||||
}
|
}
|
||||||
if (gpx->calconf_subfrm[0] == 0x32) {
|
if (gpx->calconf_subfrm[0] == 0x32) {
|
||||||
fprintf(stdout, ", \"rs41_conf0x32\": \"");
|
fprintf(stdout, ", \"rs41_conf0x32\": \"");
|
||||||
for (int _j = 0; _j < 16; _j++) {
|
for (_j = 0; _j < 16; _j++) {
|
||||||
fprintf(stdout, "%02X", gpx->calconf_subfrm[1+_j]);
|
fprintf(stdout, "%02X", gpx->calconf_subfrm[1+_j]);
|
||||||
}
|
}
|
||||||
fprintf(stdout, "\"");
|
fprintf(stdout, "\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gpx->option.cal == 2) { // cal/conf
|
if (gpx->option.cal == 2) { // cal/conf
|
||||||
|
int _j;
|
||||||
fprintf(stdout, ", \"rs41_subfrm\": \"0x%02X:", gpx->calconf_subfrm[0]);
|
fprintf(stdout, ", \"rs41_subfrm\": \"0x%02X:", gpx->calconf_subfrm[0]);
|
||||||
for (int _j = 0; _j < 16; _j++) {
|
for (_j = 0; _j < 16; _j++) {
|
||||||
fprintf(stdout, "%02X", gpx->calconf_subfrm[1+_j]);
|
fprintf(stdout, "%02X", gpx->calconf_subfrm[1+_j]);
|
||||||
}
|
}
|
||||||
fprintf(stdout, "\"");
|
fprintf(stdout, "\"");
|
||||||
|
|
Ładowanie…
Reference in New Issue