Skip to content

Commit

Permalink
Revert "Merge pull request #707 from WildernessLabs/vlx53_update"
Browse files Browse the repository at this point in the history
This reverts commit d21154b, reversing
changes made to df16769.
  • Loading branch information
adrianstevens committed Jul 25, 2023
1 parent 288c508 commit c48821d
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,13 @@ byte Read(byte address)
return result;
}

int Read16(byte address)
{
//var result = BusComms.ReadRegisters(address, 2);
BusComms.ReadRegister(address, ReadBuffer.Span[0..2]);
return (ReadBuffer.Span[0] << 8) | ReadBuffer.Span[1];
}

async Task<int> GetRawRangeData()
{
BusComms.WriteRegister(0x80, 0x01);
Expand Down Expand Up @@ -431,7 +438,7 @@ async Task<int> GetRawRangeData()
}
}

var range_mm = BusComms.ReadRegisterAsUShort((byte)Register.ResultRangeStatus + 10);
var range_mm = Read16((byte)Register.ResultRangeStatus + 10);
BusComms.WriteRegister((byte)Register.GpioHvMuxActiveHigh, 0x01);

return range_mm;
Expand Down

0 comments on commit c48821d

Please sign in to comment.