MCPcopy Create free account
hub / github.com/Alexays/Waybar / getFixStatusString

Method getFixStatusString

src/modules/gps.cpp:104–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104const std::string waybar::modules::Gps::getFixStatusString() const {
105 switch (gps_data_.fix.status) {
106 case STATUS_GPS:
107 return "GPS";
108 case STATUS_DGPS:
109 return "DGPS";
110 case STATUS_RTK_FIX:
111 return "RTK Fixed";
112 case STATUS_RTK_FLT:
113 return "RTK Float";
114 case STATUS_DR:
115 return "Dead Reckoning";
116 case STATUS_GNSSDR:
117 return "GNSS + Dead Reckoning";
118 case STATUS_TIME:
119 return "Time Only";
120 case STATUS_PPS_FIX:
121 return "PPS Fix";
122 default:
123
124#ifdef WANT_RFKILL
125 if (rfkill_.getState()) return "Disabled";
126#endif
127
128 return "Unknown";
129 }
130}
131
132auto waybar::modules::Gps::update() -> void {
133 sleep(0); // Wait for gps status change

Callers

nothing calls this directly

Calls 1

getStateMethod · 0.45

Tested by

no test coverage detected