DFM-17: 0xB,0xD? polarity(DFM17)=-polarity(DFM09)?

pull/18/head
Zilog80 2019-12-07 23:16:09 +01:00
rodzic 5ff86cb18a
commit 1860fab55d
1 zmienionych plików z 10 dodań i 8 usunięć

Wyświetl plik

@ -474,7 +474,7 @@ static int conf_out(gpx_t *gpx, ui8_t *conf_bits, int ec) {
SN6 = bits2val(conf_bits+4, 4*6); // DFM-06: Kanal 6
if (SN6 == gpx->SN6 && SN6 != 0) { // nur Nibble-Werte 0..9
gpx->sonde_typ = SNbit | 6;
gpx->ptu_out = 6;
gpx->ptu_out = 6; // <-> DFM-06
sprintf(gpx->sonde_id, "ID06:%6X", gpx->SN6);
//sprintf(json_sonde_id, "DFM06-%6X", gpx->SN6);
}
@ -484,7 +484,7 @@ static int conf_out(gpx_t *gpx, ui8_t *conf_bits, int ec) {
}
gpx->SN6 = SN6;
}
else if ( (sn2_ch & 0xF) == 0xC // 0xsCaaaab, s==sn_ch , s: 0xA=DFM-09 , 0xC=DFM-17? 0xD=?
else if ( (sn2_ch & 0xF) == 0xC // 0xsCaaaab, s==sn_ch , s: 0xA=DFM-09 , 0xC=DFM-09P , 0xB=DFM-17 , 0xD=DFM-17P?
|| (sn2_ch & 0xF) == 0x0 ) // 0xs0aaaab, s==sn_ch , s: 0x7,0x8: pilotsonde PS-15?
{
val = bits2val(conf_bits+8, 4*5);
@ -507,10 +507,12 @@ static int conf_out(gpx_t *gpx, ui8_t *conf_bits, int ec) {
gpx->sonde_typ = SNbit | sn_ch;
gpx->SN = SN;
if (sn_ch == 0xA /*&& (sn2_ch & 0xF) == 0xC*/) gpx->ptu_out = sn_ch; else gpx->ptu_out = 0;
if (sn_ch == 0xC) gpx->ptu_out = sn_ch;// DFM-09P, DFM-17 ?
if (sn_ch == 0xD && gpx->option.dbg) gpx->ptu_out = sn_ch;// DFM-17 (P?)? test 0xD ...?
// PS-15 ? (sn2_ch & 0xF) == 0x0 : gpx->ptu_out = 0
gpx->ptu_out = 0;
if (sn_ch == 0xA /*&& (sn2_ch & 0xF) == 0xC*/) gpx->ptu_out = sn_ch; // <+> DFM-09
if (sn_ch == 0xB /*&& (sn2_ch & 0xF) == 0xC*/) gpx->ptu_out = sn_ch; // <-> DFM-17
if (sn_ch == 0xC) gpx->ptu_out = sn_ch; // <+> DFM-09P
if (sn_ch == 0xD) gpx->ptu_out = sn_ch; // <-> DFM-17P?
// PS-15 ? (sn2_ch & 0xF) == 0x0 : gpx->ptu_out = 0 // <-> PS-15
if ( (gpx->sonde_typ & 0xF) == 0xA) {
sprintf(gpx->sonde_id, "ID09:%6u", gpx->SN);
@ -643,7 +645,7 @@ static void print_gpx(gpx_t *gpx) {
}
}
if (gpx->option.vbs == 3 && (gpx->ptu_out == 0xA || gpx->ptu_out >= 0xC)) {
if (gpx->option.vbs == 3 && gpx->ptu_out >= 0xA) {
printf(" U: %.2fV ", gpx->status[0]);
printf(" Ti: %.1fK ", gpx->status[1]);
}
@ -665,7 +667,7 @@ static void print_gpx(gpx_t *gpx) {
case 0: sprintf(json_sonde_id, "DFMxx-xxxxxxxx"); break; //json_sonde_id[0] = '\0';
case 6: sprintf(json_sonde_id, "DFM06-%6X", gpx->SN6); break;
case 0xA: sprintf(json_sonde_id, "DFM09-%6u", gpx->SN); break;
// 0x7: PS-15?, 0xC: DFM-17? (0xD: DFM-17?p)
// 0x7:PS-15?, 0xB:DFM-17? 0xC:DFM-09P? 0xD:DFM-17P?
default : sprintf(json_sonde_id, "DFMx%1X-%6u", gpx->sonde_typ & 0xF,gpx->SN);
}