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