Skip to content

Commit

Permalink
Add capacity to tankVolume.js (#132)
Browse files Browse the repository at this point in the history
Add capacity calculation in addition to volume
  • Loading branch information
macjl authored Sep 1, 2024
1 parent fdb4ddd commit 346639c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion calcs/tankVolume.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function (app, plugin) {
title:
"'tanks." +
instance +
"' Tank Volume (requires calibration pairs (>2 for parallell sides, >3 for straight wedge and >4 for more complex shapes)",
"' Tank Volume and Capacity (requires calibration pairs (>2 for parallell sides, >3 for straight wedge and >4 for more complex shapes)",
derivedFrom: function () {
return ['tanks.' + instance + '.currentLevel']
},
Expand Down Expand Up @@ -64,6 +64,10 @@ module.exports = function (app, plugin) {
})

return [
{
path: 'tanks.' + instance + '.capacity',
value: spline(1, calLevels, calVolumes)
},
{
path: 'tanks.' + instance + '.currentVolume',
value: spline(level, calLevels, calVolumes)
Expand Down

0 comments on commit 346639c

Please sign in to comment.