Browse Source

AP_BARO: Fix zero as nullptr in KellerLD

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
zr-v5.1
Patrick José Pereira 5 years ago committed by Peter Barker
parent
commit
e1b6ef3e14
  1. 2
      libraries/AP_Baro/AP_Baro_KellerLD.cpp

2
libraries/AP_Baro/AP_Baro_KellerLD.cpp

@ -166,7 +166,7 @@ bool AP_Baro_KellerLD::_init()
bool AP_Baro_KellerLD::_read() bool AP_Baro_KellerLD::_read()
{ {
uint8_t data[5]; uint8_t data[5];
if (!_dev->transfer(0x0, 1, data, sizeof(data))) { if (!_dev->transfer(nullptr, 1, data, sizeof(data))) {
Debug("Keller LD read failed!"); Debug("Keller LD read failed!");
return false; return false;
} }

Loading…
Cancel
Save