From 892e4a805bc4f181d484721634c09c293d926f6e Mon Sep 17 00:00:00 2001 From: George Zogopoulos Date: Tue, 17 Dec 2024 15:40:00 +0100 Subject: [PATCH] Fixed type casting --- libraries/AP_Scripting/drivers/VSPeak_flow_meter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Scripting/drivers/VSPeak_flow_meter.lua b/libraries/AP_Scripting/drivers/VSPeak_flow_meter.lua index d884a1d8f4..e13b891ba9 100644 --- a/libraries/AP_Scripting/drivers/VSPeak_flow_meter.lua +++ b/libraries/AP_Scripting/drivers/VSPeak_flow_meter.lua @@ -99,7 +99,7 @@ function uint16_value(hbyte, lbyte) end function read_uart() - local n_avail = uart:available() + local n_avail = uart:available():toint() -- Discard up to BUFFER_LEN bytes. -- These are stale data.