Skip to content
Snippets Groups Projects
Commit 568e36e1 authored by Tucker Gary Siegel's avatar Tucker Gary Siegel
Browse files

fix

parent de86a567
No related branches found
No related tags found
No related merge requests found
...@@ -129,11 +129,28 @@ func forecast(ctx common.DawnCtx, gddReq models.GddRequest, plantdate time.Time, ...@@ -129,11 +129,28 @@ func forecast(ctx common.DawnCtx, gddReq models.GddRequest, plantdate time.Time,
// check if the last value is closer than the current. if it is, then the last value is the one to return // check if the last value is closer than the current. if it is, then the last value is the one to return
if dist > lastDist { if dist > lastDist {
out[keys[currentMatch]] = &models.Bins{ out[keys[currentMatch]] = &models.Bins{
// ui is hardcoded to accept 5
Bins: []models.Bin{ Bins: []models.Bin{
{ {
Value: 1, Value: 1,
Date: plantdate.AddDate(0, 0, i-1), Date: plantdate.AddDate(0, 0, i-1),
}, },
{
Value: 0,
Date: plantdate.AddDate(0, 0, i-2),
},
{
Value: 0,
Date: plantdate.AddDate(0, 0, i-3),
},
{
Value: 0,
Date: plantdate.AddDate(0, 0, i-4),
},
{
Value: 0,
Date: plantdate.AddDate(0, 0, i-5),
},
}, },
} }
currentMatch += 1 currentMatch += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment