Skip to content

Commit

Permalink
Some update
Browse files Browse the repository at this point in the history
  • Loading branch information
jayadamsmorgan committed May 15, 2017
1 parent 692c675 commit efecb86
Show file tree
Hide file tree
Showing 17 changed files with 1,059 additions and 364 deletions.
43 changes: 1 addition & 42 deletions ROVJoystick/core/src/com/germanberdnikov/rov/CustomTouchPad.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import com.badlogic.gdx.utils.Pools;

/**
* This is copy of LibGDX's Touchpad class, modified to support of setting knob position
* This is copy of LibGDX's Touchpad class, modified for support to set knob position
*/

class CustomTouchPad extends Widget {
Expand Down Expand Up @@ -157,52 +157,11 @@ public boolean isTouched() {
return touched;
}

public boolean getResetOnTouchUp() {
return resetOnTouchUp;
}

public void setResetOnTouchUp(boolean reset) {
this.resetOnTouchUp = reset;
}

public void setDeadzone(float deadzoneRadius) {
if (deadzoneRadius < 0) throw new IllegalArgumentException("deadzoneRadius must be > 0");
this.deadzoneRadius = deadzoneRadius;
invalidate();
}

public float getKnobX() {
return knobPosition.x;
}

public float getKnobY() {
return knobPosition.y;
}

public float getKnobPercentX() {
return knobPercent.x;
}

public float getKnobPercentY() {
return knobPercent.y;
}

public static class TouchpadStyle {
public Drawable background;

public Drawable knob;

public TouchpadStyle() {
}

public TouchpadStyle(Drawable background, Drawable knob) {
this.background = background;
this.knob = knob;
}

public TouchpadStyle(com.badlogic.gdx.scenes.scene2d.ui.Touchpad.TouchpadStyle style) {
this.background = style.background;
this.knob = style.knob;
}
}
}
8 changes: 4 additions & 4 deletions ROVSoftware/ROVSoftware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ typedef unsigned char uchar;

#define MOTORLOWMICROSECONDS 1465
#define MOTORHIGHMICROSECONDS 1510
#define MOTORRANGE 400
#define MOTORRANGE 500

#define HIGH_SPEED_K 1.0
#define MID_SPEED_K 0.6
#define LOW_SPEED_K 0.3
#define MID_SPEED_K 0.5
#define LOW_SPEED_K 0.17

#define MAIN_MANIP_ROT_PINA 9
#define MAIN_MANIP_ROT_PINB 14
Expand All @@ -50,7 +50,7 @@ typedef unsigned char uchar;
#define INCOMING_PACKET_SIZE 25
#define OUTCOMING_PACKET_SIZE 15

double PITCH_KP = 2.0;
double PITCH_KP = 2.5;
double PITCH_KI = 0.0;
double PITCH_KD = 0.0;

Expand Down
35 changes: 35 additions & 0 deletions ROVThirdPilot/ThirdTest (OS X)/ThirdTest/ThirdTest.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-05-12T19:39:23
#
#-------------------------------------------------

QT += core gui
QT += multimedia multimediawidgets

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = ThirdTest
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0


SOURCES += main.cpp\
mainwindow.cpp

HEADERS += mainwindow.h

FORMS += mainwindow.ui

RESOURCES += \
source.qrc
File renamed without changes.
Loading

0 comments on commit efecb86

Please sign in to comment.