@@ -75,37 +75,36 @@ In the datalogger class we had to replace FileOutputStream with BufferedOutputSt
...
@@ -75,37 +75,36 @@ In the datalogger class we had to replace FileOutputStream with BufferedOutputSt
> While using the GUI we ran into a problem where the values would not be sent correctly to the robot. Instead of just sending one value for the P parameter all the values would change to the same as the P value. We think the problem lies in the PCcarController.java program. In the part of the program that sends the values to to robot, we had forgot to change the I value from an int to a float value (see fig. 5). After fixing this the Bluetooth connection seemed to work normally again.
> While using the GUI we ran into a problem where the values would not be sent correctly to the robot. Instead of just sending one value for the P parameter all the values would change to the same as the P value. We think the problem lies in the PCcarController.java program. In the part of the program that sends the values to to robot, we had forgot to change the I value from an int to a float value (see fig. 5). After fixing this the Bluetooth connection seemed to work normally again.
>
>
>```
>```
try
> try
{
> {
String pString = pField.getText();
> String pString = pField.getText();
int p = new Integer(pString).intValue();
> int p = new Integer(pString).intValue();
dos.writeInt(p);
> dos.writeInt(p);
dos.flush();
> dos.flush();
>
String iString = iField.getText();
> String iString = iField.getText();
float i = new Float(iString).intValue(); // The I value needs to be a float value in
> float i = new Float(iString).intValue(); // The I value needs to be a float
dos.writeFloat(i); // order to send decimal numbers.
> value in
dos.flush();
> dos.writeFloat(i); // order to send decimal numbers.