package org.usfirst.frc.team2503.r2016.input;

import org.usfirst.frc.team2503.r2016.input.gamepad.Gamepad;
import org.usfirst.frc.team2503.r2016.input.joystick.Joystick;

public abstract class JoystickJoystickGamepadControlLayout implements ControlLayout {
	
	private Joystick left;
	private Joystick right;
	private Gamepad gamepad;
	
	public JoystickJoystickGamepadControlLayout(Joystick left, Joystick right, Gamepad gamepad) {
		this.left = left;
		this.right = right;
		this.gamepad = gamepad;
	}

	public Data getData() {
		Data leftData = this.left.getData();
		Data rightData = this.right.getData();
		Data gamepadData = this.gamepad.getData();
		
		Data data = new Data();
		
		data.put("left", leftData);
		data.put("right", rightData);
		data.put("gamepad", gamepadData);
		
		return data;
	}
	
}

@@ -251,18 +251,17 @@
 ayout %7B%0A
-%09
 %0A
+
 %09private
@@ -327,18 +327,17 @@
 amepad;%0A
-%09
 %0A
+
 %09public 
@@ -645,19 +645,17 @@
 Data();%0A
-%09%09
 %0A
+
 %09%09Data d
@@ -676,14 +676,61 @@
 ();%0A
+%0A
 %09%09
+%7B
 %0A%09%09
-d
+%09Data joystickData = new Data();%0A%0A%09%09%09joystickD
 ata.
@@ -746,33 +746,42 @@
 %22, leftData);%0A%09%09
-d
+%09joystickD
 ata.put(%22right%22,
@@ -795,17 +795,26 @@
 ata);%0A%09%09
-d
+%09joystickD
 ata.put(
@@ -838,18 +838,61 @@
 dData);%0A
+%0A
 %09%09
+%09data.put(%22joysticks%22, joystickData);%0A%09%09%7D%0A
 %0A%09%09retur
@@ -902,12 +902,11 @@
 ata;%0A%09%7D%0A
-%09
 %0A%7D%0A

Implement getData()