Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/neurondash/app/modules/model/tools/battery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,12 @@ local function wakeup()
neurondash.app.formFields[i]:enable(true)
end

if not neurondash.tasks.telemetry.getSensorSource("consumption") then
neurondash.session.modelPreferences.battery.fuelSensor = 1
neurondash.app.formFields[1]:enable(false)
end


runOnce = true
else
runOnce = false
Expand Down
3 changes: 2 additions & 1 deletion scripts/neurondash/tasks/sensors/smart.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ local function calculateFuel()
-- work out what type of sensor we are running and use
-- the appropriate calculation method
if neurondash.session.modelPreferences and neurondash.session.modelPreferences.battery and neurondash.session.modelPreferences.battery.fuelSensor then
if neurondash.session.modelPreferences.battery.fuelSensor == 1 then
-- if we dont have a consumption.. fallback to voltage
if neurondash.session.modelPreferences.battery.fuelSensor == 1 or not neurondash.tasks.telemetry.getSensorSource("consumption") then
return smartfuelvoltage.calculate()
else
return smartfuel.calculate()
Expand Down
1 change: 1 addition & 0 deletions scripts/neurondash/tasks/telemetry/telemetry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ local sensorTable = {
},
sport = {
{ appId = 0x0B60, subId = 0 },
{ appId = 0x0500, subId = 0 },
},
},
},
Expand Down