Skip to content

Commit

Permalink
Merge pull request #9 from MINDS-i/release-1_4
Browse files Browse the repository at this point in the history
Release 1 4
  • Loading branch information
ChrisParkInfinetix authored Nov 12, 2021
2 parents 615d636 + 77bbedf commit 11bba45
Show file tree
Hide file tree
Showing 93 changed files with 4,967 additions and 404 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ graph.jar
Dashboard.zip
test.png
resources/stateMessageDb.xml
resources/airSettings.xml
resources/groundSettings.xml
sourceExtraction/test/
sourceExtraction/__pycache__/
DashBoard.zip
Expand All @@ -25,7 +23,8 @@ resources/tile_servers.properties
.classpath
.settings/org.eclipse.wst.sse.core.prefs
boardlist.txt
resources/groundSettings_edited.xml
arduino-cli.exe
resources/groundSettings_edited.xml
resources/groundSettings_Old.xml
resources/groundSettings.xml
resources/images/6x6-Top - Backup.png
13 changes: 13 additions & 0 deletions .gpx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" ?><gpx version="1.1" creator="MINDSi Dashboard">
<rte>
<rtept lat="48.77791275550184" lng="-111.005859375">
<ele>0.0</ele>
</rtept>
<rtept lat="42.13082130188812" lng="-118.212890625">
<ele>0.0</ele>
</rtept>
<rtept lat="41.21172151054789" lng="-105.64453125">
<ele>0.0</ele>
</rtept>
</rte>
</gpx>
13 changes: 8 additions & 5 deletions DashboardInstallerScript.iss
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#define MyAppName "MINDS-i Dashboard"
#define MyAppVersion "1.0.2"
#define MyAppVersion "1.0.4"
#define MyAppPublisher "MINDS-i Education"
#define MyAppURL "https://mindsieducation.com/"
#define MyAppExeName "Dashboard.exe"
#define TelemDrivers "RadioDiversv2.12.06WHQL_Centified.exe"
#define ArduinoCLI "arduino-cli.exe"
#define ReleaseDir "C:\Archives\Working Directory\MINDS-i\Dashboard Release"

[Setup]
AppId={{C4B2ECC1-960A-4137-BFD2-23CD33DBC5B1}
Expand All @@ -28,10 +30,11 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";

[Files]
Source: "C:\Archives\Working Directory\MINDS-i\Dashboard Release\Dashboard.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Archives\Working Directory\MINDS-i\Dashboard Release\DashBoard.jar"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Archives\Working Directory\MINDS-i\Dashboard Release\RadioDiversv2.12.06WHQL_Centified.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Archives\Working Directory\MINDS-i\Dashboard Release\resources\*"; DestDir: "{app}\resources"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#ReleaseDir}\Dashboard.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#ReleaseDir}\DashBoard.jar"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#ReleaseDir}\RadioDiversv2.12.06WHQL_Centified.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#ReleaseDir}\resources\*"; DestDir: "{app}\resources"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#ReleaseDir}\arduino-cli.exe"; DestDir: "{app}"; Flags: ignoreversion

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Expand Down
1 change: 1 addition & 0 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ MessageDbFile=resources/stateMessageDb.xml
DroneLibsDir=../MINDS-i-Drone
mainclass=com.Dashboard
pythonDir=C:/Users/CPark/AppData/Local/Programs/Python/Python39/python.exe
pythonDirOld=C:/Program Files (x86)/Python38-32/python.exe
powerShellDir=C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe
2 changes: 1 addition & 1 deletion build_infinetix.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<target name="clean" depends="init">
<delete dir="${outputDir}"/>
<delete dir="${libDir}"/>
<!--<delete dir="${libDir}"/>-->
<delete dir="${reportsDir}"/>
<delete file="${outputZip}"/>
<delete file="${outputJar}"/>
Expand Down
34 changes: 34 additions & 0 deletions resources/airSettings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<settingList><setting index="0" name="Output Period" min="5000" max="10000" def="6666"> Period in milliseconds between reading the imu, calculating orientation, and sending a signal to the ESC's&lt;br&gt; This value should be between 5000 (200Hz) and 10000(100Hz) &lt;br&gt; Higher speeds will decrease the processing time left for other tasks, but could lead to a more stable flight
</setting><setting index="1" name="Accel Gain" min="0.0" max="1.0" def="0.003"> Factor used during sensor update step. Should be between 0.0 and 1.0 A value of 0.0 flies completely based on the best estimate and gyroscope As the value approaches 1.0, the quad increasingly uses the accel measurement to inform pitch/roll.
</setting><setting index="2" name="Mag Gain" min="0.0" max="1.0" def="0.0015"> Factor used during sensor update step. Should be between 0.0 and 1.0 The closer to 1 it is, the larger impact the magnetometer has on the aircraft's yaw estimate
</setting><setting index="3" name="Att P Term" min="0" max="+inf" def="0.2"> Attitude Stabilization P term&lt;br&gt; Control proportional to current error.&lt;br&gt; Generally the main driver of PID control.&lt;br&gt; Higher P makes reaction quicker, but increases overshoot and degrades stability.
</setting><setting index="4" name="Att I Term" min="0" max="+inf" def="0.050"> Attitude Stabilization I term&lt;br&gt; Used to eliminate steady state error, too much I can increase overshoot and degrade stability.
</setting><setting index="5" name="Att D Term" min="0" max="+inf" def="0.000"> Attitude Stabilization D term&lt;br&gt; D Will dampen the output by predicting the future quadcopter position with linear extrapolation.&lt;br&gt; It will decrease overshoot and decrease settling time, but can cause new oscillations if set too high.
</setting><setting index="6" name="Att VP Term" min="0" max="+inf" def="3.00"> P term on attitude Velocity control loop &lt;br&gt; Higher values will make stabilization more aggressive.
</setting><setting index="7" name="Att VI Term" min="0" max="+inf" def="0.05"> I term on attitude Velocity control loop &lt;br&gt; Higher values increase response to drifting and unevent weight &lt;br&gt;\ Too high can cause instability and oscillations
</setting><setting index="8" name="Att VD Term" min="0" max="+inf" def="0.00"> D term on attitude Velocity control loop &lt;br&gt; Can be used to dampen oscillations and increase P's ceiling
</setting><setting index="9" name="Yaw P Term" min="-inf" max="+inf" def="1.0"> Yaw Stabilization P term&lt;br&gt;
</setting><setting index="10" name="Yaw I Term" min="0" max="+inf" def="0.0"> Yaw Stabilization I term&lt;br&gt;
</setting><setting index="11" name="Yaw D Term" min="0" max="+inf" def="0.003"> Yaw Stabilization D term&lt;br&gt;
</setting><setting index="12" name="Yaw VP Term" min="0" max="+inf" def="2.00"> Yaw stabilization VP term&lt;br&gt;
</setting><setting index="13" name="Yaw VI Term" min="0" max="+inf" def="8.00"> Yaw stabilization VI term&lt;br&gt;
</setting><setting index="14" name="Yaw VD Term" min="0" max="+inf" def="8.00"> Yaw stabilization VD term&lt;br&gt;
</setting><setting index="15" name="Hover Throttle" min="0" max="1.0" def="0.40"> Raw output throttle necessary to hover (used for throttle stick centering)&lt;br&gt; Used in the RC radio throttle stick curve equation. When the throttle stick in at 50%, This is what the quad's final output throttle will be at.
</setting><setting index="16" name="Throttle Linearity" min="0" max="1.0" def="0.40"> Affects radio throttle curve linearity&lt;br&gt; A Value of 0.5 is as linear as possible around the hover throttle&lt;br&gt; A Value of 0.0 is heavily curved for fine control around the hover point&lt;br&gt; A value of 1.0 is heavily curved for more sensitivity&lt;br&gt; A value slightly under 0.5 tends to work best
</setting><setting index="17" name="Yaw Slew Rate" min="0" max="10.0" def="1.0"> The maximum rate at which the yaw stick can adjust the yaw setpoint in half turns per second
</setting><setting index="18" name="Altitude Hold Slew Rate" min="0" max="10.0" def="1.0"> The maximum rate at which the throttle stick can adjust the altitude hold setpoint in feet per second
</setting><setting index="19" name="Barometer Gain" min="0.0" max="1.0" def="0.3"> The altitude estimate's sensitivity to changes in barometer readings 1.0 implies the altitude estimate is the exact barometer value 0.0 implies the altitude estimate is not effected by the barometer at all
</setting><setting index="20" name="Velocity Gain" min="0.0" max="1.0" def="0.30"> The vertical velocity estimate's sensitivity 1.0 implies the vertical velocity estimate updates rapidly 0.0 implies the vertical velocity estimate never changes
</setting><setting index="21" name="Altitude Response" min="0.0" max="1.0" def="0.010"> How powerful the quadcopter's responses to unwanted changes in altitude are
</setting><setting index="22" name="Altitude Velocity Factor" min="0.0" max="1.0" def="0.06"> How much the quadcopter's vertical velocity impacts its altitude hold control
</setting><setting index="23" name="Altitude Integral Factor" min="0.0" max="1.0" def="0.004"> How much the quadcopter's integrated altitude error contributes to its overall altitude corrections
</setting><setting index="24" name="Position P Term" min="-inf" max="+inf" def="0.0375"> Position hold P term&lt;br&gt;
</setting><setting index="25" name="Position I Term" min="-inf" max="+inf" def="0.005"> Position hold I Term&lt;br&gt;
</setting><setting index="26" name="Position D Term" min="-inf" max="+inf" def="0.01"> Position hold D term
</setting><setting index="27" name="Maximum Velocity" min="-inf" max="+inf" def="4.0"> Maximum over-ground travel velocity&lt;br&gt;
</setting><setting index="28" name="MaxV Distance" min="-inf" max="+inf" def="1056"> Minimum away from desired position that results in flying towards the target at the maximum allowed velocity
</setting><setting index="29" name="Low Battery Warning" min="0.0" max="+inf" def="14.0"> At what voltage to consider the quadcopter low on battery
</setting><setting index="30" name="Magnetic Declination" min="-180" max="180" def="15.0f"> The magnetic declination in degrees of the area the quad will be flying in
</setting><setting index="31" name="GPS assist" min="0" max="1" def="0"> Set to 1 to enable gps loitering when flying in assisted mode with the pitch/roll commands centered. Set to 0 to disable gps loitering; the pilot retains complete control of pitch and roll when in assisted mode, with the processor only stabilizing the altitude autonomously
</setting><setting index="32" name="Auto Descent Rate" min="0" max="+inf" def="1"> The desired descent rate in feet per second for the quadcopter to fall at when auto landing because of a radio signall loss
</setting></settingList>
Binary file modified resources/images/6x6-Front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/6x6-Side.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/6x6-Top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/Gauge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/UAV-Front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/UAV-Side.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/UAV-Top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/gaugeGlare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/nP/display/BottomBorder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/nP/display/BottomLeft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/nP/display/BottomRight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/nP/display/LeftBorder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/nP/display/RightBorder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/nP/display/TopBorder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/nP/display/TopLeft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/nP/display/TopRight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/pingGreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/pingRed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/pingSpacer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/pingYellow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/satIconGPS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/verticalMeterGreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/verticalMeterRed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/verticalMeterYellow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/verticalSpacer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/watermark.png
16 changes: 13 additions & 3 deletions resources/resources_en.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
version_id =1.0.2
release_date =2020-10-27
version_id =1.4.1
release_date =2021-11-1
image_folder =resources/images/
patch_folder =resources/images/nP/
font_folder =resources/fonts/
console_log_level =FINE
file_log_level =FINE
stateDescriptions =resources/stateMessageDb.xml
telemetryWidetSpec =resources/telemetryWidget.xml
telemetryWidgetAir =resources/telemetryWidget.xml
telemetryWidgetGnd =resources/telemetryWidgetGround.xml
tile_server_list =tile_servers
default_tile_server =satellite
text_font =DroidSansMono.ttf
Expand All @@ -29,3 +30,12 @@ display_panel =display
info_screen =screen
telemetryLabels =telemetryLabels
home_icon =Home-Icon.png
watermark =watermark.png
ping_red =pingRed.png
ping_yellow =pingYellow.png
ping_green =pingGreen.png
ping_spacer =pingSpacer.png
gps_red =verticalMeterRed.png
gps_yellow =verticalMeterYellow.png
gps_green =verticalMeterGreen.png
gps_spacer =verticalSpacer.png
3 changes: 3 additions & 0 deletions resources/telemetryLabels_en_US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ t14 =Home Latitude
t15 =Home Longitude
t16 =Home Altitude
t17 =Relative Altitude
t18 =GPS Num Sat
t19 =GPS HDOP
t20 =Heading Lock
2 changes: 1 addition & 1 deletion resources/telemetryWidget.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<telemetryWidget width="8" fontsize="22" color="0xEA8300">
<telemetryWidget width="8" fontsize="14" color="0xEA8300">
<line bg="0xDFDFDF" fmt="Alt:%4.0f" telem="12"/>
<line bg="0xEEEEEE" fmt="Sea:%4.0f" telem="8"/>
<line bg="0xDFDFDF" fmt="Mph:%4.1f" telem="5"/>
Expand Down
4 changes: 4 additions & 0 deletions resources/telemetryWidgetGround.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<telemetryWidget width="8" fontsize="14" color="0xEA8300">
<line bg="0xDFDFDF" fmt="Mph:%4.1f" telem="5"/>
<line bg="0xEEEEEE" fmt="Vcc:%4.1f" telem="6"/>
</telemetryWidget>
66 changes: 58 additions & 8 deletions src/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public class Context {
private SerialPort port;
private ResourceBundle resources;
private Properties persist;

private static final File persistanceFile =
new File(System.getProperty("user.home") + "\\AppData\\Local\\MINDS-i Dashboard\\persist.properties");
private String APMVersion;

private final File persistenceFile;
private final String instanceLogName;
private final Logger ioerr = Logger.getLogger("d.io");


public Context(Dashboard dashboard) {
dash = dashboard;
port = null;
Expand All @@ -52,13 +52,24 @@ public Context(Dashboard dashboard) {
instanceLogName = sdf.format(cal.getTime());

persist = new Properties();

//Find out what OS type we are running under
String osname = System.getProperty("os.name");
if(osname.toLowerCase().contains("windows")) {
persistenceFile = new File(System.getProperty("user.home")
+ "\\AppData\\Local\\MINDS-i Dashboard\\persist.properties");
}
else { //Assume Linux and default to relative directory structure
persistenceFile = new File("./resources/persist/persist.properties");
}

try {
if(!persistanceFile.exists()) {
persistanceFile.getParentFile().mkdirs();
persistanceFile.createNewFile();
if(!persistenceFile.exists()) {
persistenceFile.getParentFile().mkdirs();
persistenceFile.createNewFile();
}

InputStream is =new FileInputStream(persistanceFile);
InputStream is = new FileInputStream(persistenceFile);
persist.load(is);
is.close();
}
Expand Down Expand Up @@ -162,6 +173,10 @@ public void toggleLocale() {
saveProps();
}

public String getCurrentLocale() {
return (String) persist.get("subject");
}

public void setHomeProp(String lat, String lng) {
persist.setProperty("homeLat", lat);
persist.setProperty("homeLng", lng);
Expand All @@ -177,7 +192,7 @@ public Point2D getHomeProp() {
}

private void saveProps() {
try(FileOutputStream file = new FileOutputStream(persistanceFile)) {
try(FileOutputStream file = new FileOutputStream(persistenceFile)) {
persist.store(file, "");
} catch (Exception e) {
ioerr.severe("Can't save persist props "+e);
Expand Down Expand Up @@ -253,12 +268,14 @@ public void setSetting(int index, float value) {
public void setSettingQuiet(int index, float value) {
settingList.updateSettingVal(index, value);
}

public void setTelemetry(int id, float value) {
telemetry.updateTelemetry(id, (double)value);
}
public float getTelemetry(int id) {
return (float) telemetry.getTelemetry(id);
}

public String getTelemetryName(int id) {
return telemetry.getTelemetryName(id);
}
Expand All @@ -271,4 +288,37 @@ public List<DataSource> getTelemetryDataSources() {
public void onConnection() {
sender.sendWaypointList();
}

/**
* Sets the current APM board version string.
* @param version
*/
public void setAPMVersion(String version) {
APMVersion = version;
}

/**
* Gets the current AMP board version string if available,
* otherwise returns a placeholder.
* @return - String
*/
public String getAPMVersion() {
sender.sendMessage(Message.requestAPMVersion());

try {
Thread.sleep(250);
}
catch(InterruptedException ex) {
Thread.currentThread().interrupt();
System.err.println("Context - Wait for version interrupted with exception: "
+ ex.toString());
}


if(APMVersion == null || APMVersion.isEmpty()) {
APMVersion = "x.x.x";
}

return APMVersion;
}
}
Loading

0 comments on commit 11bba45

Please sign in to comment.