AP_GPS: fix bug when injecting messages bigger than 255 bytes

Commit 5261654 changed the used injection method so change this method signature to use uint16 for message length like previous injection method did
This commit is contained in:
Rob Ratcliff 2017-06-26 17:01:50 -05:00 committed by Francisco Ferreira
parent 683592ecdc
commit 60c6f8ad60
2 changed files with 4 additions and 4 deletions

View File

@ -815,7 +815,7 @@ void AP_GPS::lock_port(uint8_t instance, bool lock)
}
// Inject a packet of raw binary to a GPS
void AP_GPS::inject_data(uint8_t *data, uint8_t len)
void AP_GPS::inject_data(uint8_t *data, uint16_t len)
{
//Support broadcasting to all GPSes.
if (_inject_to == GPS_RTK_INJECT_TO_ALL) {
@ -827,7 +827,7 @@ void AP_GPS::inject_data(uint8_t *data, uint8_t len)
}
}
void AP_GPS::inject_data(uint8_t instance, uint8_t *data, uint8_t len)
void AP_GPS::inject_data(uint8_t instance, uint8_t *data, uint16_t len)
{
if (instance < GPS_MAX_RECEIVERS && drivers[instance] != nullptr) {
drivers[instance]->inject_data(data, len);

View File

@ -328,8 +328,8 @@ public:
void lock_port(uint8_t instance, bool locked);
//Inject a packet of raw binary to a GPS
void inject_data(uint8_t *data, uint8_t len);
void inject_data(uint8_t instance, uint8_t *data, uint8_t len);
void inject_data(uint8_t *data, uint16_t len);
void inject_data(uint8_t instance, uint8_t *data, uint16_t len);
//MAVLink Status Sending
void send_mavlink_gps_raw(mavlink_channel_t chan);