Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Septentrio v1.15 backport cleanup #23453

Closed
wants to merge 9 commits into from
24 changes: 24 additions & 0 deletions platforms/nuttx/src/px4/common/SerialImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,36 @@ bool SerialImpl::configure()

case 460800: speed = B460800; break;

#ifndef B500000
#define B500000 500000
#endif

case 500000: speed = B500000; break;

#ifndef B576000
#define B576000 576000
#endif

case 576000: speed = B576000; break;

#ifndef B921600
#define B921600 921600
#endif

case 921600: speed = B921600; break;

#ifndef B1000000
#define B1000000 1000000
#endif

case 1000000: speed = B1000000; break;

#ifndef B1500000
#define B1500000 1500000
#endif

case 1500000: speed = B1500000; break;

default:
speed = _baudrate;
PX4_WARN("Using non-standard baudrate: %lu", _baudrate);
Expand Down
24 changes: 24 additions & 0 deletions platforms/posix/src/px4/common/SerialImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,36 @@ bool SerialImpl::configure()

case 460800: speed = B460800; break;

#ifndef B500000
#define B500000 500000
#endif

case 500000: speed = B500000; break;

#ifndef B576000
#define B576000 576000
#endif

case 576000: speed = B576000; break;

#ifndef B921600
#define B921600 921600
#endif

case 921600: speed = B921600; break;

#ifndef B1000000
#define B1000000 1000000
#endif

case 1000000: speed = B1000000; break;

#ifndef B1500000
#define B1500000 1500000
#endif

case 1500000: speed = B1500000; break;

default:
speed = _baudrate;
PX4_WARN("Using non-standard baudrate: %u", _baudrate);
Expand Down
23 changes: 6 additions & 17 deletions src/drivers/gps/gps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,41 +717,30 @@ GPS::run()
int32_t gps_ubx_mode = 0;
param_get(handle, &gps_ubx_mode);

switch (gps_ubx_mode) {
case 1: // heading
if (gps_ubx_mode == 1) { // heading
if (_instance == Instance::Main) {
ubx_mode = GPSDriverUBX::UBXMode::RoverWithMovingBase;

} else {
ubx_mode = GPSDriverUBX::UBXMode::MovingBase;
}

break;

case 2:
} else if (gps_ubx_mode == 2) {
ubx_mode = GPSDriverUBX::UBXMode::MovingBase;
break;

case 3:
} else if (gps_ubx_mode == 3) {
if (_instance == Instance::Main) {
ubx_mode = GPSDriverUBX::UBXMode::RoverWithMovingBaseUART1;

} else {
ubx_mode = GPSDriverUBX::UBXMode::MovingBaseUART1;
}

break;

case 4:
} else if (gps_ubx_mode == 4) {
ubx_mode = GPSDriverUBX::UBXMode::MovingBaseUART1;
break;

case 5: // rover with static base on Uart2
} else if (gps_ubx_mode == 5) { // rover with static base on Uart2
ubx_mode = GPSDriverUBX::UBXMode::RoverWithStaticBaseUart2;
break;

default:
break;

}
}
Expand Down Expand Up @@ -1546,4 +1535,4 @@ int
gps_main(int argc, char *argv[])
{
return GPS::main(argc, argv);
}
}
15 changes: 5 additions & 10 deletions src/drivers/gps/params.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2016-2024 PX4 Development Team. All rights reserved.
* Copyright (c) 2016 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -152,9 +152,8 @@ PARAM_DEFINE_INT32(GPS_UBX_CFG_INTF, 0);
*
* The offset angle increases clockwise.
*
* Set this to 90 if the rover (or Unicore primary, or Septentrio Mosaic Aux)
* antenna is placed on the right side of the vehicle and the moving base
* antenna is on the left side.
* Set this to 90 if the rover (or Unicore primary) antenna is placed on the
* right side of the vehicle and the moving base antenna is on the left side.
*
* (Note: the Unicore primary antenna is the one connected on the right as seen
* from the top).
Expand Down Expand Up @@ -229,16 +228,14 @@ PARAM_DEFINE_INT32(GPS_2_PROTOCOL, 1);
* 2 : Use Galileo
* 3 : Use BeiDou
* 4 : Use GLONASS
* 5 : Use NAVIC
*
* @min 0
* @max 63
* @max 31
* @bit 0 GPS (with QZSS)
* @bit 1 SBAS
* @bit 2 Galileo
* @bit 3 BeiDou
* @bit 4 GLONASS
* @bit 5 NAVIC
*
* @reboot_required true
* @group GPS
Expand All @@ -261,16 +258,14 @@ PARAM_DEFINE_INT32(GPS_1_GNSS, 0);
* 2 : Use Galileo
* 3 : Use BeiDou
* 4 : Use GLONASS
* 5 : Use NAVIC
*
* @min 0
* @max 63
* @max 31
* @bit 0 GPS (with QZSS)
* @bit 1 SBAS
* @bit 2 Galileo
* @bit 3 BeiDou
* @bit 4 GLONASS
* @bit 5 NAVIC
*
* @reboot_required true
* @group GPS
Expand Down
Loading