change steer, speed to speedl speedr

This commit is contained in:
interfisch 2019-06-14 01:01:59 +02:00
parent 56266c35e9
commit 35dbcd4efa
1 changed files with 14 additions and 14 deletions

View File

@ -3,14 +3,14 @@ import processing.serial.*;
Serial serialport;
Visualization visVoltage;
Visualization visCurrent;
Visualization visSteer;
Visualization visSpeed;
Visualization visSpeedl;
Visualization visSpeedr;
Visualization visYaw;
Visualization visGT;
Visualization visGT_Vertical;
int steer=0;
int speed=0;
int speedl=0;
int speedr=0;
int booleanvalues=0;
float voltage = 50;
float current = 0.0;
@ -44,11 +44,11 @@ void setup() {
visCurrent.setShowMinMax(true);
visCurrent.setTitle("Current [A]");
visSteer = new BarH(10,340,100,10,-1000,1000);
visSteer.setTitle("Steer");
visSpeedl = new BarV(20,300,10,100,-1000,1000);
visSpeedl.setTitle("SpeedL");
visSpeed = new BarV(10+100/2-5,300,10,100,-1000,1000);
visSpeed.setTitle("Speed");
visSpeedr = new BarV(20+80,300,10,100,-1000,1000);
visSpeedr.setTitle("SpeedR");
visYaw = new Direction(150+100,300,100,0,360,0,1,0);
visYaw.setTitle("Yaw");
@ -66,8 +66,8 @@ void draw() {
background(255);
visVoltage.setValue(voltage);
visCurrent.setValue(current);
visSteer.setValue(steer);
visSpeed.setValue(speed);
visSpeedl.setValue(speedl);
visSpeedr.setValue(speedr);
visYaw.setValue(yaw);
visGT.setValue(-gt_horizontal);
visGT.setValue2(gt_length);
@ -76,8 +76,8 @@ void draw() {
visVoltage.drawVis();
visCurrent.drawVis();
visSteer.drawVis();
visSpeed.drawVis();
visSpeedl.drawVis();
visSpeedr.drawVis();
visYaw.drawVis();
visGT.drawVis();
visGT_Vertical.drawVis();
@ -103,8 +103,8 @@ public void receive()
if (inBuffer != null && inBuffer.length==17) {
received=true;
int _address=0;
steer = extract_int16_t(inBuffer,_address); _address+=2;
speed = extract_int16_t(inBuffer,_address); _address+=2;
speedl = extract_int16_t(inBuffer,_address); _address+=2;
speedr = extract_int16_t(inBuffer,_address); _address+=2;
booleanvalues = extract_uint8_t(inBuffer,_address); _address+=1;
voltage = extract_float(inBuffer, _address); _address+=4;
//current = extract_float(inBuffer,_address);_address+=4;