I need a Lua script written to modify the MOT_BOOST with voltage. I want to increase or decrease it by .1 by checking voltage every 30 seconds and adjusting it based on a voltage range either increase by .1 or decrease by .1.
You will need 4.1, and to put in the correct equation for voltage to MOT_BOOST_SCALE.
local boost = Parameter()
boost:init('MOT_BOOST_SCALE')
function update()
local voltage = battery:voltage(0)
boost:set( voltage * 1 + 1)
return update, 30000
end
return update