Added ability to query for herbicide agents.

This commit is contained in:
2020-04-14 20:50:27 +02:00
parent 65debd6f5f
commit 56193b1b39
2 changed files with 17 additions and 19 deletions

View File

@@ -30,25 +30,6 @@ namespace FarmmapsHerbicide
_farmmapsApiService = farmmapsApiService;
_generalService = generalService;
_herbicideService = herbicideService;
_liberatorTarweAgent = new HerbicideAgent()
{
Name = "Liberator",
SoilType = "Klei",
ExtraInputType = "OrganicMatter",
ActiveSubstanceContent = "diflu100+flufenacet400",
MinDosis = 0.33f,
MaxDosis = 0.6f,
A = 0.007f,
B = 0.25f,
C = 1.05f,
D = 97f,
E = 3f,
P = 1f,
Crop = "Tarwe",
Description = "Org. stof arme grond",
TankMix = string.Empty
};
}
public async Task RunAsync()
@@ -59,6 +40,9 @@ namespace FarmmapsHerbicide
// !! this call is needed the first time an api is called with a fresh clientid and secret !!
await _farmmapsApiService.GetCurrentUserCodeAsync();
var roots = await _farmmapsApiService.GetCurrentUserRootsAsync();
var agents = await _herbicideService.GetHerbicideAgents();
_liberatorTarweAgent = agents.SingleOrDefault(a => a.Name.Equals("Liberator"));
await SingleLutumTiffFlow(roots);
await MultiVanDenBorneShapeFlow(roots);