gps now over spi
This commit is contained in:
@@ -18,8 +18,8 @@ Modi& operator++(Modi& m, int) {
|
||||
DriveManager::DriveManager(MoveControl *moveControl, bool wifi) {
|
||||
this->moveControl = moveControl;
|
||||
|
||||
SPIClass spiPort(HSPI);
|
||||
spiPort.begin(UBLOX_GNSS_SPI_SCK, UBLOX_GNSS_SPI_CIPO, UBLOX_GNSS_SPI_COPI, UBLOX_GNSS_SPI_CS);
|
||||
this->spiPort = new SPIClass(HSPI);
|
||||
spiPort->begin(UBLOX_GNSS_SPI_SCK, UBLOX_GNSS_SPI_CIPO, UBLOX_GNSS_SPI_COPI, UBLOX_GNSS_SPI_CS);
|
||||
this->navigation = new Navigation(spiPort, UBLOX_GNSS_SPI_CS);
|
||||
if (wifi)
|
||||
this->navigation->initNtrip(NTRIP_HOST, NTRIP_PORT, NTRIP_MOUNT_POINT, NTRIP_USER, NTRIP_PASSWORD);
|
||||
@@ -29,6 +29,7 @@ DriveManager::DriveManager(MoveControl *moveControl, bool wifi) {
|
||||
|
||||
DriveManager::~DriveManager() {
|
||||
delete this->navigation;
|
||||
delete this->spiPort;
|
||||
}
|
||||
|
||||
void DriveManager::loop() {
|
||||
|
||||
Reference in New Issue
Block a user