Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Oct 26, 2021
1 parent 1cec9f8 commit da71ef1
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/eez/modules/psu/psu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,17 +859,10 @@ void onThreadMessage(uint8_t type, uint32_t param) {
dcp405::tickDacRamp();
function_generator::tick();

if (g_tickCount % 5 == 0) {
tick0();
} else if (g_tickCount % 5 == 1) {
tick1();
} else if (g_tickCount % 5 == 2) {
tick2();
} else if (g_tickCount % 5 == 3) {
tick3();
} else if (g_tickCount % 5 == 4) {
tick4();
}
static uint32_t g_tick = 0;
typedef void (*TickFunc)();
static const TickFunc g_tickFuncs[] = { tick0, tick1, tick2, tick3, tick4 };
g_tickFuncs[g_tick++ % 5]();
#endif
} else if (type == PSU_MESSAGE_CHANGE_POWER_STATE) {
changePowerState(param ? true : false);
Expand Down

0 comments on commit da71ef1

Please sign in to comment.