Adds real GPS support to Raspberry Pi arch

This commit is contained in:
Jonathan Bennett
2023-11-28 12:39:32 -06:00
parent ce8342d3e5
commit 423b8ad603
4 changed files with 19 additions and 5 deletions

View File

@@ -147,6 +147,13 @@ void portduinoSetup()
if (yamlConfig["GPIO"]) {
settingsMap[user] = yamlConfig["GPIO"]["User"].as<int>(RADIOLIB_NC);
}
if (yamlConfig["GPS"]) {
std::string serialPath = yamlConfig["GPS"]["SerialPath"].as<std::string>("");
if (serialPath != "") {
Serial1.setPath(serialPath);
settingsMap[has_gps] = 1;
}
}
} catch (YAML::Exception e) {
std::cout << "*** Exception " << e.what() << std::endl;

View File

@@ -4,7 +4,7 @@
extern std::map<int, int> settingsMap;
enum { use_sx1262, cs, irq, busy, reset, dio2_as_rf_switch, use_rf95, user, gpiochip };
enum { use_sx1262, cs, irq, busy, reset, dio2_as_rf_switch, use_rf95, user, gpiochip, has_gps };
int initGPIOPin(int pinNum, std::string gpioChipname);
#endif