 
 		//Switch to DIVE_STOP mode
 		currentMode = DIVE_STOP_MODE;
-		displayScreen(DIVE_STOP_SCREEN);
+		//displayScreen(DIVE_STOP_SCREEN);
 
 		//TODO Start surface time counter
 	}
 }
 
+////////////////////////////////////////////////////////////////////
+
+void processRemoteButtonPress(decode_results *results) {
+	if (results->value == 0xFD8877 || results->value == 0xFF629D) {
+		if (testMode) {
+			Serial.println("Up");
+			tone(speakerPin, 261, 10);
+		}
+		upButtonPressed();
+	} else if (results->value == 0xFD9867 || results->value == 0xFFA857) {
+		if (testMode) {
+			Serial.println("Down");
+			tone(speakerPin, 261, 10);
+		}
+		downButtonPressed();
+	} else if (results->value == 0xFDA857 || results->value == 0xFF02FD) {
+		if (testMode) {
+			Serial.println("OK");
+			tone(speakerPin, 261, 10);
+		}
+		selectButtonPressed();
+	}
+}
+
+// This is the OK or the Prev button on the IR Remote Control
 void selectButtonPressed() {
-	if (currentMode == SURFACE_MODE) {
+	if (currentScreen == MENU_SCREEN) {
 		switch (selectedMenuItemIndex) {
-			case 1: {
+			case 1: { //Dive
 				currentMode = DIVE_START_MODE;
-				displayScreen(DIVE_START_SCREEN);
+				displayScreen(DIVE_SCREEN);
 			}
 			break;
-			case 2 : { //Last dive
-				currentMode = DIVE_STOP_MODE;
-				displayScreen(DIVE_STOP_SCREEN);
+			case 2: { //Logbook
+				currentMode = SURFACE_MODE;
+				displayScreen(LOGBOOK_SCREEN);
 			}
 			break;
-		}
-	} else if (currentMode == DIVE_STOP_MODE || currentMode == DIVE_START_MODE) {
-		//Go back to the main menu
+			case 3: { //Surface time
+				currentMode = SURFACE_MODE;
+				displayScreen(SURFACE_TIME_SCREEN);
+			}
+			break;
+			case 4: { //Gauge
+				currentMode = GAUGE_MODE;
+				displayScreen(GAUGE_SCREEN);
+			}
+			break;
+			case 5: { //Settings
+				currentMode = SURFACE_MODE;
+				displayScreen(SETTINGS_SCREEN);
+			}
+			break;
+		}
+	} else if (currentScreen == GAUGE_SCREEN) {
 		currentMode = SURFACE_MODE;
 		displayScreen(MENU_SCREEN);
 	}
 }
 
-void navigationButtonPressed() {
-	if (currentMode == SURFACE_MODE) {
+// This is the Up or the Mode button on the IR Remote Control
+void upButtonPressed() {
+	if (currentScreen == MENU_SCREEN) {
+		if (selectedMenuItemIndex == 1) {
+			// Position to the last menu item
+			menuSelect(MENU_SIZE);
+		} else {
+			// Move down the selection
+			menuSelect(selectedMenuItemIndex - 1);
+		}
+	}
+}
+
+// This is the Down or the - button on the IR Remote Control
+void downButtonPressed() {
+	if (currentScreen == MENU_SCREEN) {
 		if (selectedMenuItemIndex < MENU_SIZE) {
 			// Move down the selection
 			menuSelect(selectedMenuItemIndex + 1);

}

void drawCurrentTemperature(float currentTemperature) {
	//TODO
}

void drawCurrentPressure(int currentPressure) {
	//TODO
}

void drawOxigenPercentage(int oxigenPercentage) {

	}
}

///////////////////////////////////////////////////////////////

void menuSelect(byte menuItemIndex) {

	tft.setColor(VGA_YELLOW);

	// Remove the highlight from the currently selected menu item
	tft.setBackColor(VGA_BLACK);
	tft.print(mainMenu[selectedMenuItemIndex], 0, ((selectedMenuItemIndex - 1) * 16) + MENU_TOP);

	// Highlight the new selected menu item
	tft.setBackColor(VGA_BLUE);
	tft.print(mainMenu[menuItemIndex], 0, ((menuItemIndex - 1) * 16) + MENU_TOP);

	// Save the selection
	selectedMenuItemIndex = menuItemIndex;
}

///////////////////////////////////////////////////////////////////////////////

void displayScreen(byte screen) {
	currentScreen = screen;

	switch (screen) {
		case MENU_SCREEN:
