Skip to content

Commit

Permalink
callsign_uncertain for 0x1XXX codes
Browse files Browse the repository at this point in the history
  • Loading branch information
windytan committed Nov 15, 2017
1 parent cf3e8b6 commit 6668014
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@
"description": "Call sign letters for a North American (RBDS) station",
"type": "string",
},
"callsign_uncertain": {
"description": "Call sign letters for a North American (RBDS) station - probably erroneous due to a TMC workaround",
"type": "string",
},
"prog_type": {
"description": "Program Type",
"type": "string"
Expand Down
8 changes: 6 additions & 2 deletions src/groups.cc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,12 @@ void Station::UpdateAndPrint(const Group& group, std::ostream* stream) {
json_["pi"] = "0x" + HexString(pi(), 4);
if (options_.rbds) {
std::string callsign = PiToCallSign(pi());
if (!callsign.empty())
json_["callsign"] = callsign;
if (!callsign.empty()) {
if ((pi() & 0xF000) == 0x1000)
json_["callsign_uncertain"] = callsign;
else
json_["callsign"] = callsign;
}
}

if (options_.timestamp)
Expand Down

0 comments on commit 6668014

Please sign in to comment.