testing some simple math examples
This commit is contained in:
@@ -29,3 +29,17 @@ static void DisableAll()
|
||||
DigIo::ch2ena_out.Clear();
|
||||
DigIo::ch3ena_out.Clear();
|
||||
}
|
||||
|
||||
static void CalcTotals()
|
||||
{
|
||||
s32fp totalCurrent = Param::Get(Param::c1idc) + Param::Get(Param::c2idc) + Param::Get(Param::c3idc);
|
||||
|
||||
Param::SetFixed(Param::idc, totalCurrent);
|
||||
s32fp u1 = Param::Get(Param::c1udc);
|
||||
s32fp u2 = Param::Get(Param::c2udc);
|
||||
s32fp u3 = Param::Get(Param::c3udc);
|
||||
|
||||
s32fp udcmax = MAX(u1, MAX(u2, u3));
|
||||
Param::SetFixed(Param::udc, udcmax);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user