GobySoft/goby

Benthos driver cannot handle Source:000 or Destination:000 correctly

Closed this issue · 0 comments

[ 2018-Sep-07 20:19:57.375855 ]               {benthosatm900::fsm}: D: ReceiveData
[ 2018-Sep-07 20:19:57.375909 ]               {goby::acomms::modemdriver::in::1}: D: a7 b4 5d a8  9c e4 43 2a    27 3c 7e bc  d3 f6 01 0d
[ 2018-Sep-07 20:19:57.375954 ]               {goby::acomms::modemdriver::in::1}: D: 
[ 2018-Sep-07 20:19:57.375987 ]               {goby::acomms::modemdriver::in::1}: D: 
[ 2018-Sep-07 20:19:57.376026 ]               {goby::acomms::modemdriver::in::1}: D: Source:000  Destination:001
[ 2018-Sep-07 20:19:57.376120 ]: (Warning): Invalid data received, ignoring. Reason: bad lexical cast: source type value could not be interpreted as target
[ 2018-Sep-07 20:19:57.376163 ]               {benthosatm900::fsm}: D: ~ReceiveData

This appears to be caused by line 155 of benthos_atm_driver_fsm.cpp, which trims away the entire 000.

                boost::trim_left_if(id_str, boost::is_any_of("0"));