MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / init

Function init

Tactility/Source/hal/gps/GpsInit.cpp:145–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143// endregion
144
145bool 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
176bool 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

Callers

nothing calls this directly

Calls 8

initAg33xxFunction · 0.85
initAtgm336hFunction · 0.85
initMtkFunction · 0.85
initMtkL76bFunction · 0.85
initMtkPa1616sFunction · 0.85
initUc6580Function · 0.85
infoMethod · 0.80
checkFunction · 0.50

Tested by

no test coverage detected