Esempio n. 1
0
void OnSetLed()
{
  Serial.println("OnTemperure");
  double temp = cmdMessenger.readDoubleArg();
  setLed(temp);
  Serial.print("temperature : ");
  Serial.println(temp);
}
void OnSetFingers()
{
  MYSERIAL.println("OnSetFingers");
  int i;
  for(i = 0; i < NUM_FINGERS; ++i)
  {
    double pos = cmdMessenger.readDoubleArg();
    pos = min(1, max(0, pos)) * (MAX_POS-MIN_POS) + MIN_POS;
    double speed = cmdMessenger.readDoubleArg();
    speed = min(1, max(0, speed)) * (MAX_SPEED-MIN_SETSPEED) + MIN_SETSPEED;

    MYSERIAL.print("finger: ");
    MYSERIAL.println(i);
    MYSERIAL.print("pos: ");
    MYSERIAL.println(pos);
    MYSERIAL.print("speed: ");
    MYSERIAL.println(speed);
    finger[i].writeSpeed(speed);
    finger[i].writePos(pos);
    states[i] = kWaitMoveState;
  }
}
Esempio n. 3
0
void onDataSetQueryInt()
{
	sysDataPushInterval = (uint32_t)cmdMessenger.readDoubleArg();
	onDataReturnQueryInt();
}