Compare commits
1 Commits
postgresql
...
optimize-t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33de831391 |
5
.idea/dbnavigator.xml
generated
5
.idea/dbnavigator.xml
generated
@@ -2,7 +2,7 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="DBNavigator.Project.DataEditorManager">
|
<component name="DBNavigator.Project.DataEditorManager">
|
||||||
<record-view-column-sorting-type value="BY_INDEX" />
|
<record-view-column-sorting-type value="BY_INDEX" />
|
||||||
<value-preview-text-wrapping value="true" />
|
<value-preview-text-wrapping value="false" />
|
||||||
<value-preview-pinned value="false" />
|
<value-preview-pinned value="false" />
|
||||||
</component>
|
</component>
|
||||||
<component name="DBNavigator.Project.DataExportManager">
|
<component name="DBNavigator.Project.DataExportManager">
|
||||||
@@ -39,9 +39,6 @@
|
|||||||
<component name="DBNavigator.Project.EditorStateManager">
|
<component name="DBNavigator.Project.EditorStateManager">
|
||||||
<last-used-providers />
|
<last-used-providers />
|
||||||
</component>
|
</component>
|
||||||
<component name="DBNavigator.Project.FileConnectionMappingManager">
|
|
||||||
<mapping file-url="file://$PROJECT_DIR$/db_setup.sql" connection-id="94a6cabe-5b17-467d-a87c-dc17d3749f25" current-schema="information_schema" />
|
|
||||||
</component>
|
|
||||||
<component name="DBNavigator.Project.MethodExecutionManager">
|
<component name="DBNavigator.Project.MethodExecutionManager">
|
||||||
<method-browser />
|
<method-browser />
|
||||||
<execution-history>
|
<execution-history>
|
||||||
|
|||||||
9
.idea/libraries/Gradle___IOBoard_RPi_0_1_.xml
generated
Normal file
9
.idea/libraries/Gradle___IOBoard_RPi_0_1_.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="Gradle: :IOBoard-RPi-0.1:">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$PROJECT_DIR$/libs/IOBoard-RPi-0.1.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</component>
|
||||||
1
.idea/modules/poc-java.iml
generated
1
.idea/modules/poc-java.iml
generated
@@ -5,6 +5,7 @@
|
|||||||
<content url="file://$MODULE_DIR$/../..">
|
<content url="file://$MODULE_DIR$/../..">
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../.gradle" />
|
<excludeFolder url="file://$MODULE_DIR$/../../.gradle" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/../../build" />
|
<excludeFolder url="file://$MODULE_DIR$/../../build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/../../out" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
|||||||
3
.idea/modules/poc-java_main.iml
generated
3
.idea/modules/poc-java_main.iml
generated
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module external.linked.project.id="poc-java:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="com.henrypump.poc" external.system.module.type="sourceSet" external.system.module.version="1.0-SNAPSHOT" type="JAVA_MODULE" version="4">
|
<module external.linked.project.id="poc-java:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="com.henrypump.poc" external.system.module.type="sourceSet" external.system.module.version="1.0-SNAPSHOT" type="JAVA_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||||
<output url="file://$MODULE_DIR$/../../build/classes/main" />
|
<output url="file://$MODULE_DIR$/../../out/production/classes" />
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$/../../src/main">
|
<content url="file://$MODULE_DIR$/../../src/main">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" />
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
<orderEntry type="library" name="Gradle: org.mongodb:mongodb-driver:3.4.2" level="project" />
|
<orderEntry type="library" name="Gradle: org.mongodb:mongodb-driver:3.4.2" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: de.vandermeer:asciitable:0.2.5" level="project" />
|
<orderEntry type="library" name="Gradle: de.vandermeer:asciitable:0.2.5" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: :IOBoard-0.1:" level="project" />
|
<orderEntry type="library" name="Gradle: :IOBoard-0.1:" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: :IOBoard-RPi-0.1:" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: junit:junit:4.10" level="project" />
|
<orderEntry type="library" name="Gradle: junit:junit:4.10" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: org.mongodb:bson:3.4.2" level="project" />
|
<orderEntry type="library" name="Gradle: org.mongodb:bson:3.4.2" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: org.mongodb:mongodb-driver-core:3.4.2" level="project" />
|
<orderEntry type="library" name="Gradle: org.mongodb:mongodb-driver-core:3.4.2" level="project" />
|
||||||
|
|||||||
3
.idea/modules/poc-java_test.iml
generated
3
.idea/modules/poc-java_test.iml
generated
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module external.linked.project.id="poc-java:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="com.henrypump.poc" external.system.module.type="sourceSet" external.system.module.version="1.0-SNAPSHOT" type="JAVA_MODULE" version="4">
|
<module external.linked.project.id="poc-java:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="com.henrypump.poc" external.system.module.type="sourceSet" external.system.module.version="1.0-SNAPSHOT" type="JAVA_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||||
<output-test url="file://$MODULE_DIR$/../../build/classes/test" />
|
<output-test url="file://$MODULE_DIR$/../../out/test/classes" />
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$/../../src/test">
|
<content url="file://$MODULE_DIR$/../../src/test">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/../../src/test/java" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/../../src/test/java" isTestSource="true" />
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
<orderEntry type="library" name="Gradle: org.mongodb:mongodb-driver:3.4.2" level="project" />
|
<orderEntry type="library" name="Gradle: org.mongodb:mongodb-driver:3.4.2" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: de.vandermeer:asciitable:0.2.5" level="project" />
|
<orderEntry type="library" name="Gradle: de.vandermeer:asciitable:0.2.5" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: :IOBoard-0.1:" level="project" />
|
<orderEntry type="library" name="Gradle: :IOBoard-0.1:" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: :IOBoard-RPi-0.1:" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: org.mongodb:bson:3.4.2" level="project" />
|
<orderEntry type="library" name="Gradle: org.mongodb:bson:3.4.2" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: org.mongodb:mongodb-driver-core:3.4.2" level="project" />
|
<orderEntry type="library" name="Gradle: org.mongodb:mongodb-driver-core:3.4.2" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: de.vandermeer:asciilist:0.0.3" level="project" />
|
<orderEntry type="library" name="Gradle: de.vandermeer:asciilist:0.0.3" level="project" />
|
||||||
|
|||||||
1162
.idea/workspace.xml
generated
1162
.idea/workspace.xml
generated
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,7 @@ dependencies {
|
|||||||
compile group: 'org.mongodb', name: 'mongodb-driver', version:'3.4.2'
|
compile group: 'org.mongodb', name: 'mongodb-driver', version:'3.4.2'
|
||||||
compile group: 'de.vandermeer', name: 'asciitable', version:'0.2.5'
|
compile group: 'de.vandermeer', name: 'asciitable', version:'0.2.5'
|
||||||
compile name: 'IOBoard-0.1'
|
compile name: 'IOBoard-0.1'
|
||||||
|
compile name: 'IOBoard-RPi-0.1'
|
||||||
testCompile group: 'junit', name: 'junit', version:'3.8.1'
|
testCompile group: 'junit', name: 'junit', version:'3.8.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -2,7 +2,6 @@ package com.henrypump.poc;
|
|||||||
|
|
||||||
import com.henrypump.io.DigitalIn;
|
import com.henrypump.io.DigitalIn;
|
||||||
import com.henrypump.io.DigitalOut;
|
import com.henrypump.io.DigitalOut;
|
||||||
import com.henrypump.io.MuxSetup;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by patrickjmcd on 2/10/17.
|
* Created by patrickjmcd on 2/10/17.
|
||||||
@@ -19,6 +18,8 @@ public class IOControl implements Runnable {
|
|||||||
IOControl(POC poc) {
|
IOControl(POC poc) {
|
||||||
this.poc = poc;
|
this.poc = poc;
|
||||||
// IO
|
// IO
|
||||||
|
|
||||||
|
if (this.poc.ioEnabled){
|
||||||
startBtn = new DigitalIn(1);
|
startBtn = new DigitalIn(1);
|
||||||
stopBtn = new DigitalIn(2);
|
stopBtn = new DigitalIn(2);
|
||||||
led2 = new DigitalOut(3);
|
led2 = new DigitalOut(3);
|
||||||
@@ -27,6 +28,17 @@ public class IOControl implements Runnable {
|
|||||||
led5 = new DigitalOut(6);
|
led5 = new DigitalOut(6);
|
||||||
runningIndicator = new DigitalOut(2);
|
runningIndicator = new DigitalOut(2);
|
||||||
runCommand = new DigitalOut(1);
|
runCommand = new DigitalOut(1);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
startBtn = new DigitalIn(99);
|
||||||
|
stopBtn = new DigitalIn(99);
|
||||||
|
led2 = new DigitalOut(99);
|
||||||
|
led3 = new DigitalOut(99);
|
||||||
|
led4 = new DigitalOut(99);
|
||||||
|
led5 = new DigitalOut(99);
|
||||||
|
runningIndicator = new DigitalOut(99);
|
||||||
|
runCommand = new DigitalOut(99);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startWell(){
|
private void startWell(){
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import java.time.ZonedDateTime;
|
|||||||
public class POC implements Runnable{
|
public class POC implements Runnable{
|
||||||
protected Well thisWell;
|
protected Well thisWell;
|
||||||
private Thread t;
|
private Thread t;
|
||||||
private boolean ioEnabled;
|
boolean ioEnabled;
|
||||||
|
|
||||||
POC(String dbHostname){
|
POC(String dbHostname){
|
||||||
ioEnabled = true;
|
ioEnabled = true;
|
||||||
|
|||||||
@@ -242,12 +242,12 @@ public class Well {
|
|||||||
int minRaw = Integer.MAX_VALUE;
|
int minRaw = Integer.MAX_VALUE;
|
||||||
while (Duration.between(startTime, Instant.now()).toMillis() < 30000){
|
while (Duration.between(startTime, Instant.now()).toMillis() < 30000){
|
||||||
inclinometer.read(ioMux);
|
inclinometer.read(ioMux);
|
||||||
if (inclinometer.rawValue > maxRaw){
|
if (inclinometer.getRawValue() > maxRaw){
|
||||||
maxRaw = inclinometer.rawValue;
|
maxRaw = inclinometer.getRawValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inclinometer.rawValue < minRaw){
|
if (inclinometer.getRawValue() < minRaw){
|
||||||
minRaw = inclinometer.rawValue;
|
minRaw = inclinometer.getRawValue();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
Thread.sleep(10);
|
Thread.sleep(10);
|
||||||
@@ -867,7 +867,7 @@ public class Well {
|
|||||||
pumpStartTime = ZonedDateTime.now();
|
pumpStartTime = ZonedDateTime.now();
|
||||||
db.newRunStatus(getRunStatusString(), initiator);
|
db.newRunStatus(getRunStatusString(), initiator);
|
||||||
int[] inclMinMax = calibrateInclinometer();
|
int[] inclMinMax = calibrateInclinometer();
|
||||||
inclinometer = new AnalogIn(inclinometer.channel, inclMinMax[0], inclMinMax[1], inclinometer.euMin, inclinometer.euMax);
|
inclinometer = new AnalogIn(inclinometer.getChannel(), inclMinMax[0], inclMinMax[1], inclinometer.getEuMin(), inclinometer.getEuMax());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user