| 143 | // endregion |
| 144 | |
| 145 | bool init(::Device* uart, GpsModel type) { |
| 146 | switch (type) { |
| 147 | case GpsModel::Unknown: |
| 148 | check(false); |
| 149 | case GpsModel::AG3335: |
| 150 | case GpsModel::AG3352: |
| 151 | return initAg33xx(uart); |
| 152 | case GpsModel::ATGM336H: |
| 153 | return initAtgm336h(uart); |
| 154 | case GpsModel::LS20031: |
| 155 | return true; |
| 156 | case GpsModel::MTK: |
| 157 | return initMtk(uart); |
| 158 | case GpsModel::MTK_L76B: |
| 159 | return initMtkL76b(uart); |
| 160 | case GpsModel::MTK_PA1616S: |
| 161 | return initMtkPa1616s(uart); |
| 162 | case GpsModel::UBLOX6: |
| 163 | case GpsModel::UBLOX7: |
| 164 | case GpsModel::UBLOX8: |
| 165 | case GpsModel::UBLOX9: |
| 166 | case GpsModel::UBLOX10: |
| 167 | return ublox::init(uart, type); |
| 168 | case GpsModel::UC6580: |
| 169 | return initUc6580(uart); |
| 170 | } |
| 171 | |
| 172 | LOGGER.info("Init not implemented {}", static_cast<int>(type)); |
| 173 | return false; |
| 174 | } |
| 175 | |
| 176 | bool initAg33xx(::Device* uart) { |
| 177 | uart_controller_write_bytes(uart, (const uint8_t*)"$PAIR066,1,0,1,0,0,1*3B\r\n", 25, 250); // Enable GPS+GALILEO+NAVIC |
nothing calls this directly
no test coverage detected