Skip to content

Commit 48b28a2

Browse files
authored
[0.8.0]: Update krpc to 0.5.4, enforce code style (#36)
* [MP-2]: Created button for Create Maneuvers Panel (#16) * [MP-2]: Added button for Create Maneuvers, fixed some UI * [MP-2]: Created button for Create Maneuvers Panel Included a fix for not finishing the maneuver burn. Changed the 'Change Vessel' area to 10km for 'nearest'. * [MP-2]: Making liftoff button get back to telemetry jpanel (#17) * [MP-2]: Added button for Create Maneuvers, fixed some UI * [MP-2]: Created button for Create Maneuvers Panel Included a fix for not finishing the maneuver burn. Changed the 'Change Vessel' area to 10km for 'nearest'. * [MP-2]: Making liftoff button get back to telemetry jpanel * [MP-2]: Incremented patch version for bugfix (#18) * [MP-2]: Added button for Create Maneuvers, fixed some UI * [MP-2]: Created button for Create Maneuvers Panel Included a fix for not finishing the maneuver burn. Changed the 'Change Vessel' area to 10km for 'nearest'. * [MP-2]: Making liftoff button get back to telemetry jpanel * [MP-2]: Incremented patch version for bugfix * [DEV]: Updated KRPC, Protobuf and README Updated KRPC to version 0.5.1 and protobuf-java to 3.22.1 README link for KRPC was updated to 0.5.1 Changed MechPeste version to 0.6.2 MechPeste now installs krpc version 0.5.1 from the menu * [DEV]: Adding new version of KRPC, safer de-orbiting * [MP-2]: Create the UI for maneuver creation helper (#20) * [MP-2]: Added button for Create Maneuvers, fixed some UI * [MP-2]: Created button for Create Maneuvers Panel Included a fix for not finishing the maneuver burn. Changed the 'Change Vessel' area to 10km for 'nearest'. * [MP-2]: Making liftoff button get back to telemetry jpanel * [MP-2]: Incremented patch version for bugfix * [MP-2]: Created Panel and Functionality * [MP-2]: Added event listeners for maneuver buttons * [MP-2]: Began implementing Rendezvous code * [MP-2]: Unified Create and Run Maneuver JPanels * [MP-2]: Saving current changes to MechPeste * Docking test (#21) * [MP-2]: Added button for Create Maneuvers, fixed some UI * [MP-2]: Created button for Create Maneuvers Panel Included a fix for not finishing the maneuver burn. Changed the 'Change Vessel' area to 10km for 'nearest'. * [MP-2]: Making liftoff button get back to telemetry jpanel * [MP-2]: Incremented patch version for bugfix * [MP-2]: Created Panel and Functionality * [MP-2]: Added event listeners for maneuver buttons * [MP-2]: Began implementing Rendezvous code * [MP-2]: Unified Create and Run Maneuver JPanels * [MP-2]: Saving current changes to MechPeste * -- First implementation of auto-docking * -- Managed to debug on Neovim * -- Changed how ControlePID works * [Docking]: Finally have a working docking script? * [Docking]: Working 1st and 2nd docking stage * [Docking]: We have a docking script! * [Docking]: Implement docking into MechPeste * [Docking]: Organize docking code * [Docking]: Implement maneuvering around target * [Landing]: Fix landing speed calculation * [Maven]: Implement Maven project manager (#22) * [MP-2]: Added button for Create Maneuvers, fixed some UI * [MP-2]: Created button for Create Maneuvers Panel Included a fix for not finishing the maneuver burn. Changed the 'Change Vessel' area to 10km for 'nearest'. * [MP-2]: Making liftoff button get back to telemetry jpanel * [MP-2]: Incremented patch version for bugfix * [MP-2]: Created Panel and Functionality * [MP-2]: Added event listeners for maneuver buttons * [MP-2]: Began implementing Rendezvous code * [MP-2]: Unified Create and Run Maneuver JPanels * [MP-2]: Saving current changes to MechPeste * -- First implementation of auto-docking * -- Managed to debug on Neovim * -- Changed how ControlePID works * [Docking]: Finally have a working docking script? * [Docking]: Working 1st and 2nd docking stage * [Docking]: We have a docking script! * [Docking]: Implement docking into MechPeste * [Docking]: Organize docking code * [Docking]: Implement maneuvering around target * [Landing]: Fix landing speed calculation * [Maven]: Implement Maven project manager * [Maven]: Configure project to use Maven to deploy new versions * [Maven]: Add version checker using Maven * [Maven]: Update version display code, README file * [CI]: Add CI workflow to project using Maven * [CI]: Add KRPC as a Local Library on GHA * [CI]: Add release script * [CI]: Update release script * [CI]: Install KRPC before build * [CI]: Release script test * [CI]: Create tags test * [CI]: Set version using ENV variables * [Release]: Creating tag before release * [CI]: Updated release scripts * [CI]: Separate env and tag steps * [Release]: Adjust tag name * [Release]: Release new version when pushing to master * [MP-3]: Add docking step texts, sort lines on Bundle files (#28) * [MP-5]: Translate portuguese variable names to english (#32) * [MP-6]: Adding code style to project (#34) * [MP-6]: Adding code style to project * [MP-6]: Applying linting rules to project files * [MP-4]: Update krpc version entries to 0.5.4 (#35) * [MP-4]: Update krpc version entries to 0.5.4 * [MP-4]: Include krpc-java-0.5.4, fix double value * [MP-4]: Bump minor version to 0.8.0
1 parent ef82578 commit 48b28a2

45 files changed

Lines changed: 4440 additions & 4517 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci-workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
- name: Install KRPC as a Local Library
2424
run: |
2525
mvn install:install-file \
26-
-Dfile=./src/main/resources/krpc-java-0.5.2.jar \
26+
-Dfile=./src/main/resources/krpc-java-0.5.4.jar \
2727
-DgroupId=io.github.krpc \
2828
-DartifactId=krpc-java \
29-
-Dversion=0.5.2 \
29+
-Dversion=0.5.4 \
3030
-Dpackaging=jar
3131
3232
- name: Set up JDK 17

.github/workflows/release-new-version.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
- name: Install KRPC as a Local Library
2222
run: |
2323
mvn install:install-file \
24-
-Dfile=./src/main/resources/krpc-java-0.5.2.jar \
24+
-Dfile=./src/main/resources/krpc-java-0.5.4.jar \
2525
-DgroupId=io.github.krpc \
2626
-DartifactId=krpc-java \
27-
-Dversion=0.5.2 \
27+
-Dversion=0.5.4 \
2828
-Dpackaging=jar
2929
3030
- name: Set up JDK 17

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.shelf/
22
.idea/
3-
.settings/
43
bin/
54
tmp/
65
*.tmp

.settings/org.eclipse.core.runtime.prefs

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
1-
eclipse.preferences.version=1
2-
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
1+
# Java Version
32
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
43
org.eclipse.jdt.core.compiler.compliance=1.8
5-
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6-
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
7-
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8-
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
9-
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
10-
org.eclipse.jdt.core.compiler.processAnnotations=disabled
11-
org.eclipse.jdt.core.compiler.release=disabled
124
org.eclipse.jdt.core.compiler.source=1.8
5+
6+
# Indentation
7+
org.eclipse.jdt.core.formatter.tabulation.char=space
8+
org.eclipse.jdt.core.formatter.tabulation.size=4
9+
org.eclipse.jdt.core.formatter.indentation.size=4
10+
11+
# Braces
12+
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
13+
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
14+
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
15+
16+
# Line Wrapping
17+
org.eclipse.jdt.core.formatter.lineSplit=120
18+
org.eclipse.jdt.core.formatter.join_wrapped_lines=false
19+
20+
# Other
21+
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
22+
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=true

.settings/org.eclipse.jdt.ui.prefs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
eclipse.preferences.version=1
2+
formatter_profile=_custom
3+
formatter_settings_version=12

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ manobras, e pilotar rovers.
1111
---
1212
É necessário ter o [Java](https://java.com/pt-BR/) instalado para utilizar o "MechPeste.jar".
1313
Uma versão mais atualizada do
14-
mod [KRPC](https://github.com/krpc/krpc/releases/download/v0.5.2/krpc-0.5.2.zip)
14+
mod [KRPC](https://github.com/krpc/krpc)
1515
pode ser instalada diretamente do aplicativo MechPeste pelo menu Arquivo > Instalar KRPC.
1616

1717
## **Como instalar:**
@@ -78,14 +78,14 @@ mover para o alvo, desviando dos obstáculos à frente.
7878

7979
Agora o MechPeste tem como base o gerenciador de dependências Maven. Para poder instalar a biblioteca
8080
do KRPC no entanto, como não está disponível no repositório público do Maven, é necessário fazer o download
81-
e instalar a biblioteca KRPC em sua versão 0.5.2 com o seguinte comando:
81+
e instalar a biblioteca KRPC em sua versão 0.5.4 com o seguinte comando:
8282

8383
``` bash
8484
mvn install:install-file \
85-
-Dfile=<CAMINHO_DO_DOWNLOAD>\krpc-java-0.5.2.jar \
85+
-Dfile=<CAMINHO_DO_DOWNLOAD>\krpc-java-0.5.4.jar \
8686
-DgroupId=io.github.krpc \
8787
-DartifactId=krpc-java \
88-
-Dversion=0.5.2 \
88+
-Dversion=0.5.4 \
8989
-Dpackaging=jar \
9090
```
9191
Substitua `<CAMINHO_DO_DOWNLOAD>` pela pasta onde está o arquivo do KRPC. Isso instalará essa biblioteca

pom.xml

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.pesterenan</groupId>
77
<artifactId>MechPeste</artifactId>
8-
<version>0.7.1</version>
8+
<version>0.8.0</version>
99

1010
<build>
1111
<plugins>
@@ -15,8 +15,8 @@
1515
<version>3.11.0</version>
1616
<configuration>
1717
<encoding>UTF-8</encoding>
18-
</configuration>
19-
</plugin>
18+
</configuration>
19+
</plugin>
2020
<plugin>
2121
<groupId>org.apache.maven.plugins</groupId>
2222
<artifactId>maven-jar-plugin</artifactId>
@@ -25,10 +25,10 @@
2525
<archive>
2626
<manifest>
2727
<mainClass>com.pesterenan.MechPeste</mainClass>
28-
</manifest>
29-
</archive>
30-
</configuration>
31-
</plugin>
28+
</manifest>
29+
</archive>
30+
</configuration>
31+
</plugin>
3232
<plugin>
3333
<groupId>org.apache.maven.plugins</groupId>
3434
<artifactId>maven-assembly-plugin</artifactId>
@@ -37,53 +37,66 @@
3737
<archive>
3838
<manifest>
3939
<mainClass>com.pesterenan.MechPeste</mainClass>
40-
</manifest>
41-
</archive>
40+
</manifest>
41+
</archive>
4242
<descriptorRefs>
4343
<descriptorRef>jar-with-dependencies</descriptorRef>
44-
</descriptorRefs>
44+
</descriptorRefs>
4545
<finalName>MechPeste-${project.version}</finalName>
4646
<appendAssemblyId>false</appendAssemblyId>
47-
</configuration>
47+
</configuration>
4848
<executions>
4949
<execution>
5050
<id>make-assembly</id>
5151
<phase>package</phase>
5252
<goals>
5353
<goal>single</goal>
54-
</goals>
55-
</execution>
56-
</executions>
57-
</plugin>
58-
</plugins>
59-
</build>
54+
</goals>
55+
</execution>
56+
</executions>
57+
</plugin>
58+
<plugin>
59+
<groupId>com.diffplug.spotless</groupId>
60+
<artifactId>spotless-maven-plugin</artifactId>
61+
<version>2.37.0</version>
62+
<configuration>
63+
<java>
64+
<eclipse>
65+
<version>4.19</version>
66+
<file>${project.basedir}/.settings/org.eclipse.jdt.core.prefs</file>
67+
</eclipse>
68+
</java>
69+
</configuration>
70+
</plugin>
71+
</plugins>
72+
</build>
6073

6174
<properties>
6275
<maven.compiler.source>1.8</maven.compiler.source>
6376
<maven.compiler.target>1.8</maven.compiler.target>
64-
</properties>
77+
</properties>
6578

6679
<dependencies>
6780
<dependency>
6881
<groupId>org.apache.maven</groupId>
6982
<artifactId>maven-model</artifactId>
7083
<version>3.3.9</version>
71-
</dependency>
84+
</dependency>
7285
<dependency>
7386
<groupId>io.github.krpc</groupId>
7487
<artifactId>krpc-java</artifactId>
75-
<version>0.5.2</version>
76-
</dependency>
88+
<version>0.5.4</version>
89+
</dependency>
7790
<dependency>
7891
<groupId>org.javatuples</groupId>
7992
<artifactId>javatuples</artifactId>
8093
<version>1.2</version>
81-
</dependency>
94+
</dependency>
8295
<dependency>
8396
<groupId>com.google.protobuf</groupId>
8497
<artifactId>protobuf-java</artifactId>
8598
<version>3.22.1</version>
86-
</dependency>
87-
</dependencies>
99+
</dependency>
100+
</dependencies>
88101

89-
</project>
102+
</project>

src/main/java/com/pesterenan/Main.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ public static void main(String[] args) {
159159
currentZAxisSpeed = (targetPosition.z - lastZTargetPos) * sleepTime;
160160

161161
// Calcular a aceleração para cada eixo no RCS:
162-
float forwardsError = calculateThrottle(5, 10, currentYAxisSpeed,
163-
targetPosition.y, SPEED_LIMIT);
162+
float forwardsError = calculateThrottle(5, 10, currentYAxisSpeed, targetPosition.y, SPEED_LIMIT);
164163
float sidewaysError = calculateThrottle(-1, 10, currentXAxisSpeed, targetPosition.x, SPEED_LIMIT);
165164
float upwardsError = calculateThrottle(-1, 10, currentZAxisSpeed, targetPosition.z, SPEED_LIMIT);
166165
control.setForward((float) forwardsError);
@@ -190,17 +189,12 @@ private static float calculateThrottle(double minDistance, double maxDistance, d
190189

191190
private static void createLines(Vector start, Vector end) {
192191
try {
193-
distanceLine = drawing.addLine(start.toTriplet(),
194-
end.toTriplet(), vesselRefFrame, true);
195-
distLineXAxis = drawing.addLine(start.toTriplet(),
196-
new Vector(end.x, 0.0, 0.0).toTriplet(),
197-
vesselRefFrame, true);
198-
distLineYAxis = drawing.addLine(start.toTriplet(),
199-
new Vector(end.x, end.y, 0.0).toTriplet(),
200-
vesselRefFrame, true);
201-
distLineZAxis = drawing.addLine(start.toTriplet(),
202-
end.toTriplet(),
192+
distanceLine = drawing.addLine(start.toTriplet(), end.toTriplet(), vesselRefFrame, true);
193+
distLineXAxis = drawing.addLine(start.toTriplet(), new Vector(end.x, 0.0, 0.0).toTriplet(), vesselRefFrame,
194+
true);
195+
distLineYAxis = drawing.addLine(start.toTriplet(), new Vector(end.x, end.y, 0.0).toTriplet(),
203196
vesselRefFrame, true);
197+
distLineZAxis = drawing.addLine(start.toTriplet(), end.toTriplet(), vesselRefFrame, true);
204198
distanceLine.setThickness(0.5f);
205199
distLineXAxis.setThickness(0.25f);
206200
distLineYAxis.setThickness(0.25f);

0 commit comments

Comments
 (0)