add osnma tweets
parent
085a3e93c9
commit
233b201a76
16
galmonmon.cc
16
galmonmon.cc
|
@ -45,7 +45,6 @@ public:
|
|||
std::optional<string> reportState(string_view thing, string_view name, var_t state, const std::string& state_text="");
|
||||
std::optional<string> getState(string_view thing, string_view name);
|
||||
|
||||
|
||||
std::optional<string> getPrevState(string_view thing, string_view name);
|
||||
|
||||
struct State
|
||||
|
@ -206,6 +205,7 @@ int main(int argc, char **argv)
|
|||
g_sk.setBoolNames("health", "healthy", "unhealthy");
|
||||
g_sk.setBoolNames("eph-too-old", "ephemeris fresh", "ephemeris aged");
|
||||
g_sk.setBoolNames("silent", "observed", "not observed");
|
||||
g_sk.setBoolNames("osnma", "OFF", "ON");
|
||||
|
||||
std::variant<bool, string> tst;
|
||||
|
||||
|
@ -292,6 +292,18 @@ int main(int argc, char **argv)
|
|||
|
||||
}
|
||||
|
||||
static int ctr;
|
||||
bool overriden=false;
|
||||
/*
|
||||
if(fullName=="E01@1") {
|
||||
if(((ctr++) % 130) < 65)
|
||||
if(sv.count("osnma"))
|
||||
overriden = true;
|
||||
cerr<<"Reporting for "<<fullName<<": "<<(overriden || (sv.count("osnma") && (sv["osnma"] != false)))<<endl;
|
||||
}
|
||||
*/
|
||||
auto osnmachange = g_sk.reportState(fullName, "osnma", overriden || (sv.count("osnma") && (sv["osnma"] != false)));
|
||||
|
||||
auto healthchange = g_sk.reportState(fullName, "health", sv["healthissue"]!=0);
|
||||
std::optional<string> tooOldChange;
|
||||
if(gnssid == 2)
|
||||
|
@ -331,6 +343,8 @@ int main(int argc, char **argv)
|
|||
*/
|
||||
ostringstream out;
|
||||
|
||||
if(osnmachange)
|
||||
out<<"OSNMA state change: "<< (*osnmachange) <<" ";
|
||||
|
||||
if(healthchange)
|
||||
out<< *healthchange<<" ";
|
||||
|
|
Loading…
Reference in New Issue