
    case 'Z':
      pinMode(pin, INPUT); // High Impedance
      break;
    default:
      return COMMAND_ERROR("Unknown pin mode");

  }
  return OK;
}

// Process the commands and execute them.

static const CommandHandler commands[] = {
  CommandHandler('A', &analogueRead), // Read the analogue pins
  CommandHandler('L', &led), // Control the debug LED (H/L)
  CommandHandler('R', &readPin), // Read a digital pin <number>
  CommandHandler('S', &servo), // Control a servo <num> <width>
  CommandHandler('T', &ultrasoundReadTiming), // Read an ultrasound raw timing
  CommandHandler('U', &ultrasoundReadDistance), // Read an ultrasound distance
  CommandHandler('V', &version), // Get firmware version
  CommandHandler('W', &writePin), // Write to or  a GPIO pin <number> <state>
};

static void dispatch_command(int requestID, const class CommandHandler& handler, const String& argument) {
  auto response = handler.run(requestID, argument);
  if (response == OK) {
    serialWrite(requestID, '+', "OK");
  } else {
    serialWrite(requestID, '-', "Error: " + response);
  }
}

static void handle_actual_command(int requestID, const String& cmd) {
  char commandIssued = cmd.charAt(0);

  for (int i = 0; i < sizeof(commands) / sizeof(CommandHandler); ++i) {
    const CommandHandler& handler = commands[i];

    if (handler.command == commandIssued) {
      dispatch_command(requestID, handler, cmd.substring(1));
      return;
    }
  }

  serialWrite(requestID, '-', String("Error, unknown command: ") + commandIssued);
}

static void handle_command(const String& cmd) {
  // A command is prefixed with @ if an identifier is used to prevent race conditions
  if (cmd.startsWith("@")) {
    auto spaceIndex = cmd.indexOf(' ');
    auto requestID = cmd.substring(1, spaceIndex).toInt();
    handle_actual_command(requestID, cmd.substring(spaceIndex + 1));
  } else {
    handle_actual_command(0, cmd);
  }
}

static String serialBuffer;
static boolean skipWS = false;

static void process_serial() {
  auto serialInput = Serial.read();

  // Allow resetting the buffer by sending a NULL. This allows for recovery
  // from partial commands being sent or received.
  if (serialInput == 0) {
    serialBuffer = "";
    return;
  }

  if (serialInput == -1) {
    return;
  }

  if (serialInput == '\r') {
    return; // ignore CR, just take the LF
  }

  if (serialInput == '\t') {
    serialInput =''; // treat tabs as equivalent to spaces
  }

  if (serialInput == '\n') {
    serialBuffer.trim();
    Serial.write("# ");
    Serial.write(serialBuffer.c_str());
    Serial.write('\n');
    handle_command(serialBuffer);
    serialBuffer = "";
    Serial.flush();
    return;
  }

  if (serialInput =='' && skipWS) {
    return; // ignore junk whitespace
  } else {
    skipWS = (serialInput ==''); // ignore any successive whitespace
  }

  serialBuffer += (char)serialInput;
}


void setup() {
  // Setup the pins.
  pinMode(LED_BUILTIN, OUTPUT);
  for (int pin = 2; pin <= 13; ++pin) {
    pinMode(pin, INPUT);
  }

  Serial.begin(115200);
  Serial.setTimeout(5);

  Serial.write("# Booted\n");
  serialWrite(0, '#', FIRMWARE_VERSION);
}

void loop() {
  while (Serial.available()) {
    process_serial();
  }
}
 

After I got over the fence i kept on walking,  until i reached a t- section in the road right under a bridge. By this point I should've been at the main road that leads off to the house but i seemed to have found myself in a whole other residential area which I wasn't familiar with (keep in mind I live right around the corner and i know the neighbourhood pretty well). A woman on a bicycle ride road by and I asked her for directions for my aunt's road. She said that she has lived here all her life and never heard of it.

I asked her if she was sure and she said yes, and to prove it to she handed me her phone, offering me to type the address in (mine had run out of battery by this point). So i typed it in and strangely enough nothing came up, and I couldn't even recognise the map at all. I was completely baffled and the woman seemed slightly annoyed at me for wasting her time so she was soon on her way. 

So after a tiny bit more wondering I realised that I was totally disorientated, and I had no other option than to retrace my steps and go all the way back over to the fence of the bus parking lot. So I climbed back over it, went through the parking lot, went around it and immeadiately found myself at the main road that i was so familiar with, and somehow had managed to miss.

Every now and then i think back to this moment and wonder what the heck went on around there...<filename>roles/tomcat_app/tasks/main.yml
---
- name: Deploying {{ app_name }} | create context config dir
  file: path={{ tomcat_install_dir }}/Catalina/{{ app_name }}.{{ base_domain }} state=directory owner=tomcat group=tomcat

- name: Deploying {{ app_name }} | copy tomcat context config
  template: src=tomcat_app.xml.j2 dest={{ tomcat_install_dir }}/Catalina/{{ app_name }}.{{ base_domain }}/{{ deploy_xml_name }}.xml owner=tomcat group=tomcat
  notify: restart {{ tomcat_handler_name }}

- name: Deploying {{ app_name }} | Create {{ tomcat_app_base_dir_name }} for each application's host
  file: path={{ tomcat_lib_dir }}/{{ tomcat_app_base_dir_name }}-{{ app_name }} state=directory group=tomcat owner=tomcat

- name: Deploying {{ app_name }} | Create directory where we download application packages (e.g. jar/war files)
  file: path=~/{{ app_name }}-downloads state=directory

- include: download-from-maven.yml
  when: app_local_war == ''

- include: upload-from-local.yml
  when: app_local_war!= ''

- name: Deploying {{ app_name }} | get the sha1 sum of current war
  stat: path={{ tomcat_install_dir }}/wars/{{ deploy_name }}.war  checksum_algorithm=sha1
  register: current_app_stat

- name: Deploying {{ deploy_name }} | get the sha1 sum of the candidate
  stat: path={{ candidate_war }} checksum_algorithm=sha1
  register: candidate_app_stat

- debug: var=current_app_stat

- debug: var=candidate_app_stat

- include: deploy.yml
  when: current_app_stat.stat.exists == false or candidate_app_stat.stat.checksum!= current_app_stat.stat.checksum
  register: new_deployment
Ah sounds like it is directInput, so you're out of luck at least for the moment. XInput wrapping is when you run software on a computer to convert a directInput controller to act like an XInput controller, so not a workable solution for the Pocket.   


I'm hoping that when they introduce controller remapping at the dock level (not per core) we'll get some level of directInput support. Most of my tests with different directInput controllers had some of the buttons randomly mapped to ones that work (just not the right ones), while most buttons didn't do anything.  The fact that some worked makes me hopeful it's just a button mapping issue to get these working eventually.roomPEDRA arose from our extensive travel experience, first as a couple and as a family for a few years now. For us, staying in a house is a synonym for comfort, freedom, intimacy and quality.
This is precisely what we want our guests to feel in