Browse Source

AP_Rangefinder: Update WASP defaults

mission-4.1.18
Michael du Breuil 7 years ago committed by Randy Mackay
parent
commit
fb99ea0446
  1. 14
      libraries/AP_RangeFinder/AP_RangeFinder_Wasp.cpp
  2. 8
      libraries/AP_RangeFinder/RangeFinder.cpp

14
libraries/AP_RangeFinder/AP_RangeFinder_Wasp.cpp

@ -40,14 +40,14 @@ const AP_Param::GroupInfo AP_RangeFinder_Wasp::var_info[] = { @@ -40,14 +40,14 @@ const AP_Param::GroupInfo AP_RangeFinder_Wasp::var_info[] = {
// @Description: Sets the repetition frequency of the ranging operation in Hertz. Upon entering the desired frequency the system will calculate the nearest frequency that it can handle according to the resolution of internal timers.
// @Range: 0 10000
// @User: Advanced
AP_GROUPINFO("WSP_FRQ", 3, AP_RangeFinder_Wasp, frq, 100),
AP_GROUPINFO("WSP_FRQ", 3, AP_RangeFinder_Wasp, frq, 20),
// @Param: WSP_AVG
// @DisplayName: Multi-pulse averages
// @Description: Sets the number of pulses to be used in multi-pulse averaging mode. In this mode, a sequence of rapid fire ranges are taken and then averaged to improve the accuracy of the measurement
// @Range: 0 255
// @User: Advanced
AP_GROUPINFO("WSP_AVG", 4, AP_RangeFinder_Wasp, avg, 4),
AP_GROUPINFO("WSP_AVG", 4, AP_RangeFinder_Wasp, avg, 2),
// @Param: WSP_THR
// @DisplayName: Sensitivity threshold
@ -56,10 +56,16 @@ const AP_Param::GroupInfo AP_RangeFinder_Wasp::var_info[] = { @@ -56,10 +56,16 @@ const AP_Param::GroupInfo AP_RangeFinder_Wasp::var_info[] = {
// @User: Advanced
AP_GROUPINFO("WSP_THR", 5, AP_RangeFinder_Wasp, thr, -1),
// @Param: WSP_BAUD
// @DisplayName: Baud rate
// @Description: Desired baud rate
// @Values: 0:Low Speed,1:High Speed
// @User: Advanced
AP_GROUPINFO("WSP_BAUD", 6, AP_RangeFinder_Wasp, baud, 0),
AP_GROUPEND
};
AP_RangeFinder_Wasp::AP_RangeFinder_Wasp(RangeFinder::RangeFinder_State &_state,
AP_SerialManager &serial_manager,
uint8_t serial_instance) :
@ -151,7 +157,7 @@ void AP_RangeFinder_Wasp::update(void) { @@ -151,7 +157,7 @@ void AP_RangeFinder_Wasp::update(void) {
break;
case WASP_CFG_ENCODING:
uart->end();
uart->begin(baud > 0 ? 912600 : 115200);
uart->begin(baud > 0 ? 921600 : 115200);
hal.util->snprintf(command, COMMAND_BUFFER_LEN, ">LBE LITTLE\n");
break;
case WASP_CFG_PROTOCOL:

8
libraries/AP_RangeFinder/RangeFinder.cpp

@ -44,7 +44,7 @@ const AP_Param::GroupInfo RangeFinder::var_info[] = { @@ -44,7 +44,7 @@ const AP_Param::GroupInfo RangeFinder::var_info[] = {
// @Param: _TYPE
// @DisplayName: Rangefinder type
// @Description: What type of rangefinder device that is connected
// @Values: 0:None,1:Analog,2:MaxbotixI2C,3:LidarLiteV2-I2C,5:PX4-PWM,6:BBB-PRU,7:LightWareI2C,8:LightWareSerial,9:Bebop,10:MAVLink,11:uLanding,12:LeddarOne,13:MaxbotixSerial,14:TeraRangerI2C,15:LidarLiteV3-I2C,16:VL53L0X,17:NMEA,18:WASP-200,19:BenewakeTF02,20:BenewakeTFmini
// @Values: 0:None,1:Analog,2:MaxbotixI2C,3:LidarLiteV2-I2C,5:PX4-PWM,6:BBB-PRU,7:LightWareI2C,8:LightWareSerial,9:Bebop,10:MAVLink,11:uLanding,12:LeddarOne,13:MaxbotixSerial,14:TeraRangerI2C,15:LidarLiteV3-I2C,16:VL53L0X,17:NMEA,18:WASP-LRF,19:BenewakeTF02,20:BenewakeTFmini
// @User: Standard
AP_GROUPINFO("_TYPE", 0, RangeFinder, state[0].type, 0),
@ -175,7 +175,7 @@ const AP_Param::GroupInfo RangeFinder::var_info[] = { @@ -175,7 +175,7 @@ const AP_Param::GroupInfo RangeFinder::var_info[] = {
// @Param: 2_TYPE
// @DisplayName: Second Rangefinder type
// @Description: What type of rangefinder device that is connected
// @Values: 0:None,1:Analog,2:MaxbotixI2C,3:LidarLiteV2-I2C,5:PX4-PWM,6:BBB-PRU,7:LightWareI2C,8:LightWareSerial,9:Bebop,10:MAVLink,11:uLanding,12:LeddarOne,13:MaxbotixSerial,14:TeraRangerI2C,15:LidarLiteV3-I2C,16:VL53L0X,17:NMEA,18:WASP-200,19:BenewakeTF02,20:BenewakeTFmini
// @Values: 0:None,1:Analog,2:MaxbotixI2C,3:LidarLiteV2-I2C,5:PX4-PWM,6:BBB-PRU,7:LightWareI2C,8:LightWareSerial,9:Bebop,10:MAVLink,11:uLanding,12:LeddarOne,13:MaxbotixSerial,14:TeraRangerI2C,15:LidarLiteV3-I2C,16:VL53L0X,17:NMEA,18:WASP-LRF,19:BenewakeTF02,20:BenewakeTFmini
// @User: Advanced
AP_GROUPINFO("2_TYPE", 12, RangeFinder, state[1].type, 0),
@ -300,7 +300,7 @@ const AP_Param::GroupInfo RangeFinder::var_info[] = { @@ -300,7 +300,7 @@ const AP_Param::GroupInfo RangeFinder::var_info[] = {
// @Param: 3_TYPE
// @DisplayName: Third Rangefinder type
// @Description: What type of rangefinder device that is connected
// @Values: 0:None,1:Analog,2:MaxbotixI2C,3:LidarLiteV2-I2C,5:PX4-PWM,6:BBB-PRU,7:LightWareI2C,8:LightWareSerial,9:Bebop,10:MAVLink,11:uLanding,12:LeddarOne,13:MaxbotixSerial,14:TeraRangerI2C,15:LidarLiteV3-I2C,16:VL53L0X,17:NMEA,18:WASP-200,19:BenewakeTF02,20:BenewakeTFmini
// @Values: 0:None,1:Analog,2:MaxbotixI2C,3:LidarLiteV2-I2C,5:PX4-PWM,6:BBB-PRU,7:LightWareI2C,8:LightWareSerial,9:Bebop,10:MAVLink,11:uLanding,12:LeddarOne,13:MaxbotixSerial,14:TeraRangerI2C,15:LidarLiteV3-I2C,16:VL53L0X,17:NMEA,18:WASP-LRF,19:BenewakeTF02,20:BenewakeTFmini
// @User: Advanced
AP_GROUPINFO("3_TYPE", 25, RangeFinder, state[2].type, 0),
@ -425,7 +425,7 @@ const AP_Param::GroupInfo RangeFinder::var_info[] = { @@ -425,7 +425,7 @@ const AP_Param::GroupInfo RangeFinder::var_info[] = {
// @Param: 4_TYPE
// @DisplayName: Fourth Rangefinder type
// @Description: What type of rangefinder device that is connected
// @Values: 0:None,1:Analog,2:MaxbotixI2C,3:LidarLiteV2-I2C,5:PX4-PWM,6:BBB-PRU,7:LightWareI2C,8:LightWareSerial,9:Bebop,10:MAVLink,11:uLanding,12:LeddarOne,13:MaxbotixSerial,14:TeraRangerI2C,15:LidarLiteV3-I2C,16:VL53L0X,17:NMEA,18:WASP-200,19:BenewakeTF02,20:BenewakeTFmini
// @Values: 0:None,1:Analog,2:MaxbotixI2C,3:LidarLiteV2-I2C,5:PX4-PWM,6:BBB-PRU,7:LightWareI2C,8:LightWareSerial,9:Bebop,10:MAVLink,11:uLanding,12:LeddarOne,13:MaxbotixSerial,14:TeraRangerI2C,15:LidarLiteV3-I2C,16:VL53L0X,17:NMEA,18:WASP-LRF,19:BenewakeTF02,20:BenewakeTFmini
// @User: Advanced
AP_GROUPINFO("4_TYPE", 37, RangeFinder, state[3].type, 0),

Loading…
Cancel
Save