예제 #1
0
void OnSetLed()
{
  Serial.println("OnTemperure");
  double temp = cmdMessenger.readDoubleArg();
  setLed(temp);
  Serial.print("temperature : ");
  Serial.println(temp);
}
예제 #2
0
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;
  }
}
예제 #3
0
void onDataSetQueryInt()
{
	sysDataPushInterval = (uint32_t)cmdMessenger.readDoubleArg();
	onDataReturnQueryInt();
}