Add explicit per-plan gauge temperature offset
Test and deploy / test-and-deploy (push) Successful in 1m23s
Test and deploy / test-and-deploy (push) Successful in 1m23s
This commit is contained in:
1 parent
d96ed22de1
commit
eda3d8e77f
8 files changed
+90
-7
No files matched your search
+8
-5
@@ -9,11 +9,14 @@ const numeric = (v) =>
|
||||
? Number(v)
|
||||
: null;
|
||||
|
||||
// No roaster selection, learned median, or override changes these illustrative points.
|
||||
// An explicit per-plan gauge offset is a temperature difference: no +32 conversion.
|
||||
// Legacy roaster selection, learned medians, and machine overrides remain ignored.
|
||||
export const planTemperatureOffsetF = (plan) => numeric(plan?.temperatureOffsetF) ?? 0;
|
||||
export function buildPlanCurve(plan, ledger) {
|
||||
const t = plan.temps ?? {};
|
||||
const fc = numeric(t.fc?.tempC) ?? 200;
|
||||
const yellow = numeric(t.yellow?.tempC) ?? 160;
|
||||
const offsetC = planTemperatureOffsetF(plan) / 1.8;
|
||||
const fc = numeric(t.fc?.tempC) ?? (200 + offsetC);
|
||||
const yellow = numeric(t.yellow?.tempC) ?? (160 + offsetC);
|
||||
const maillardRate =
|
||||
ledger.maillard > 0 ? Math.max(0, (fc - yellow) / ledger.maillard) : 0;
|
||||
// Development's mean rise is lower than Maillard's, even for a short development.
|
||||
@@ -23,13 +26,13 @@ export function buildPlanCurve(plan, ledger) {
|
||||
key: "charge",
|
||||
label: "Charge",
|
||||
timeS: 0,
|
||||
tempC: numeric(t.charge?.tempC) ?? 200,
|
||||
tempC: numeric(t.charge?.tempC) ?? (200 + offsetC),
|
||||
},
|
||||
{
|
||||
key: "tp",
|
||||
label: "Turning point",
|
||||
timeS: t.tp?.time ? parseDuration(t.tp.time) : 60,
|
||||
tempC: numeric(t.tp?.tempC) ?? 95,
|
||||
tempC: numeric(t.tp?.tempC) ?? (95 + offsetC),
|
||||
},
|
||||
{
|
||||
key: "yellow",
|
||||
|
||||
Reference in new issue
Block a user