Ejemplo n.º 1
0
void MGC3130::enableAirwheel(bool en) {
  write_buffer[0] = 0x10;
  write_buffer[1] = 0x00;
  write_buffer[2] = 0x00;
  write_buffer[3] = 0xA2;
  write_buffer[4] = 0x90;
  write_buffer[5] = 0x00;
  write_buffer[6] = 0x00;
  write_buffer[7] = 0x00;
  write_buffer[8] = (en ? 0x20 : 0x00);
  write_buffer[9] = 0x00;
  write_buffer[10] = 0x00;
  write_buffer[11] = 0x00;
  write_buffer[12] = 0x20;
  write_buffer[13] = 0x00;
  write_buffer[14] = 0x00;
  write_buffer[15] = 0x00;
  writeX(-1, 16, (uint8_t*) write_buffer);
}
Ejemplo n.º 2
0
void MGC3130::enableApproachDetect(bool en) {
  write_buffer[0] = 0x10;
  write_buffer[1] = 0x00;
  write_buffer[2] = 0x00;
  write_buffer[3] = 0xA2;
  write_buffer[4] = 0x97;
  write_buffer[5] = 0x00;
  write_buffer[6] = 0x00;
  write_buffer[7] = 0x00;
  write_buffer[8] = (en ? 0x01 : 0x00);
  write_buffer[9] = 0x00;
  write_buffer[10] = 0x00;
  write_buffer[11] = 0x00;
  write_buffer[12] = 0x10;
  write_buffer[13] = 0x00;
  write_buffer[14] = 0x00;
  write_buffer[15] = 0x00;
  writeX(-1, 16, (uint8_t*) write_buffer);
}
Ejemplo n.º 3
0
static int
writeStrX(int fd, char const *str)
{
  return writeX(fd, str, strlen(str));
}