| 102 | } |
| 103 | |
| 104 | const 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 | |
| 132 | auto waybar::modules::Gps::update() -> void { |
| 133 | sleep(0); // Wait for gps status change |