Skip to content

Commit 4af0e47

Browse files
committed
Fixed some timer bugs and removed logging page from build
1 parent 052ba4b commit 4af0e47

File tree

7 files changed

+24
-12
lines changed

7 files changed

+24
-12
lines changed

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default {
2929
{ title: "Configuration", link: "/config" },
3030
{ title: "Events", link: "/events" },
3131
{ title: "Timers", link: "/timer" },
32-
{ title: "Log", link: "/log" },
32+
//{ title: "Log", link: "/log" },
3333
{ title: "CLI", link: "/cli" },
3434
],
3535
};

src/background.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ protocol.registerSchemesAsPrivileged([
1616
async function createWindow() {
1717
// Create the browser window.
1818
const win = new BrowserWindow({
19-
width: 1200,
20-
height: 800,
21-
minWidth: 1000,
19+
width: 1700,
20+
height: 1000,
21+
minWidth: 1200,
2222
minHeight: 800,
2323
webPreferences: {
2424
// Use pluginOptions.nodeIntegration, leave this alone
@@ -30,6 +30,10 @@ async function createWindow() {
3030
});
3131

3232
win.removeMenu();
33+
34+
win.webContents.on('did-finish-load',() => {
35+
win.setTitle("CATS Configurator");
36+
});
3337

3438
if (process.env.WEBPACK_DEV_SERVER_URL) {
3539
// Load the url of the dev server if in development mode
@@ -62,7 +66,7 @@ app.on("activate", () => {
6266
// Some APIs can only be used after this event occurs.
6367
app.on("ready", async () => {
6468
subscribeListeners();
65-
69+
6670
if (isDevelopment && !process.env.IS_TEST) {
6771
// Install Vue Devtools
6872
try {

src/modules/ipc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function subscribeListeners() {
99
});
1010

1111
ipcMain.on("BOARD:SET_CONFIG", async (event, [key, value]) => {
12-
if (!key || !value) return;
12+
if (!key) return;
1313
command(`set ${key} = ${value}`);
1414
});
1515

src/modules/serial.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,22 @@ function connect(path) {
2929
port = new SerialPort(path, CONFIG, function (err) {
3030
if (err) return sendToRenderer("CONNECTION_ERROR", err);
3131
});
32+
3233

3334
parser = port.pipe(
3435
new Readline({
3536
delimiter: "\r\n",
3637
encoding: "utf8",
3738
})
3839
);
40+
3941
parser.on("data", onData);
4042

4143
port.on("error", function (err) {
4244
sendAlert(err.message);
4345
});
4446
port.on("open", function () {
47+
port.write('\n');
4548
command("version");
4649
sendToRenderer("CONNECTED");
4750
});
@@ -68,7 +71,12 @@ function onData(data) {
6871
if (cliMode) {
6972
return sendToRenderer("CLI_COMMAND", data);
7073
}
74+
//console.log(data);
7175

76+
if (data.includes("CATS is now ready")){
77+
command("version");
78+
}
79+
7280
// Catch confirmation response
7381
if (data.includes("^._.^") || data === "version") {
7482
currentCommand = data === "version" ? "version" : parseCommand(data);

src/modules/settings.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ export const EVENT_SETTINGS = [
108108
];
109109

110110
export const CONFIG_SETTINGS = {
111-
boot_state: { name: "Mode", unit: null },
111+
//boot_state: { name: "Mode", unit: null },
112112
main_altitude: { name: "Main Altitude", unit: "m" },
113-
acc_threshhold: { name: "Liftoff Threshold", unit: "m/s^2" },
113+
acc_threshhold: { name: "Liftoff Threshold", unit: "mg" },
114114
};
115115

116116
export const LOG_ELEMENTS = [
@@ -129,6 +129,6 @@ export const LOG_ELEMENTS = [
129129
];
130130

131131
// KEYS:
132-
export const TIMER_KEYS = ["timer1", "timer2", "timer3", "timer4"];
132+
export const TIMER_KEYS = ["timer1", "timer2"]; //, "timer3", "timer4"];
133133
export const EVENT_KEYS = ["ev_liftoff", "ev_burnout", "ev_apogee", "ev_lowalt", "ev_touchdown", "ev_custom1", "ev_custom2"];
134134
export const LOG_KEYS = ["rec_speed", "rec_elements"];

src/router/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ const routes = [
3030
name: "Timers",
3131
component: TimersView,
3232
},
33-
{
33+
/*{
3434
path: "/log",
3535
name: "Log",
3636
component: LogsView,
37-
},
37+
},*/
3838
{
3939
path: "/cli",
4040
name: "Cli",

src/views/Home.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
If you are having issues connecting, please refer the getting started
99
guid on
1010
<a
11-
href="https://www.electronjs.org/docs/latest/tutorial/in-app-purchases"
11+
href="https://github.com/catsystems/cats-embedded/wiki/Installation"
1212
target="_blank"
1313
>
1414
Github

0 commit comments

Comments
 (0)