Beispiel #1
0
static bool handleScheduleTask(int size, const byte *msg, CONTEXT *context)
    {
    byte *expr = (byte *) &msg[1];
    byte id = evalWord8Expr(&expr, context);
    unsigned long deltaMillis = evalWord32Expr(&expr, context);
    return scheduleById(id, deltaMillis);
    }
Beispiel #2
0
static bool handleSetSpeed(int size, const byte *msg, CONTEXT *context)
    {
    byte *expr = (byte *) &msg[1];
    byte stepperId = evalWord8Expr(&expr, context);
    uint32_t speed = evalWord32Expr(&expr, context);

    steppers[stepperId]->setSpeed(speed);
    return false;
    }
Beispiel #3
0
void storeWord32Ref(byte *expr, CONTEXT *context, byte refIndex)
    {
    uint32_t w32Val = evalWord32Expr(&expr, context);

    *((uint32_t *) haskinoRefs[refIndex].ref) = w32Val;
    }