Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalize Settings menu #413

Merged
merged 13 commits into from
Feb 10, 2020
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function createWindow() {
window.setFullScreen(true)
}

setTimeout(sendVersionInfo, 42 * 1000);
setTimeout(sendVersionInfo, 30 * 1000);
activateScreenSleepListener();

window.on('closed', () => {
Expand Down
128 changes: 86 additions & 42 deletions sample.config.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,95 @@
{
"octoprint": {
"url": "http://localhost:5000/api/",
"accessToken": "INSERT API KEY HERE",
"apiInterval": 15000
},
"printer": {
"name": "NAME HERE",
"xySpeed": 100,
"zSpeed": 5
},
"filament": {
"thickness": 0,
"density": 0
},
"octodash": {
"touchscreen": true,
"temperatureSensor": null,
"customActions": [{
"icon": "home",
"command": "G28",
"color": "#dcdde1"
"config": {
"octoprint": {
"accessToken": "INSERT API KEY HERE",
"url": "http://localhost:5000/api/"
},
"printer": {
"name": "NAME HERE",
"xySpeed": 100,
"zSpeed": 5
},
"filament": {
"density": 0,
"thickness": 0,
"feedLength": 470,
"feedSpeed": 100
},
"plugins": {
"displayLayerProgress": {
"enabled": true
},
{
"icon": "ruler-vertical",
"command": "G29",
"color": "#44bd32"
"enclosure": {
"enabled": true,
"ambientSensorID": null,
"filament1SensorID": null,
"filament2SensorID": null
},
{
"icon": "fire-alt",
"command": "M140 S50; M104 S185",
"color": "#e1b12c"
"filamentManager": {
"enabled": true
},
{
"icon": "snowflake",
"command": "M140 S0; M104 S0",
"color": "#0097e6"
"preheatButton": {
"enabled": true
},
{
"icon": "redo-alt",
"command": "[!RELOAD]",
"color": "#7f8fa6"
"printTimeGenius": {
"enabled": true
},
{
"icon": "skull",
"command": "[!KILL]",
"color": "#e84118"
"psuControl": {
"enabled": true,
"turnOnPSUWhenExitingSleep": false
}
]
},
"octodash": {
"customActions": [{
"icon": "home",
"command": "G28",
"color": "#dcdde1",
"confirm": false,
"exit": false
},
{
"icon": "ruler-vertical",
"command": "G29",
"color": "#44bd32",
"confirm": false,
"exit": false
},
{
"icon": "fire-alt",
"command": "M140 S50; M104 S185",
"color": "#e1b12c",
"confirm": false,
"exit": true
},
{
"icon": "snowflake",
"command": "M140 S0; M104 S0",
"color": "#0097e6",
"confirm": false,
"exit": true
},
{
"icon": "redo-alt",
"command": "[!RELOAD]",
"color": "#7f8fa6",
"confirm": true,
"exit": false
},
{
"icon": "skull",
"command": "[!KILL]",
"color": "#e84118",
"confirm": true,
"exit": false
}
],
"fileSorting": {
"attribute": "name",
"order": "asc"
},
"pollingInterval": 2000,
"touchscreen": true,
"turnScreenOffWhileSleeping": false
}
}
}
5 changes: 4 additions & 1 deletion src/app/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export class AppService {
// If the errors can be automatically fixed return true here
public autoFixError(): boolean {
const config = this.configService.getCurrentConfig();
config.octodash.temperatureSensor.ambient = 1;
this.configService.saveConfig(config);
this.configService.updateConfig();
return false;
Expand All @@ -53,6 +52,10 @@ export class AppService {
setTimeout(this.checkUpdate.bind(this), 21.6 * 1000000);
}

public getVersion(): string {
return this.version;
}

public turnDisplayOff(): void {
if (this.ipc) {
this.ipc.send('screenSleep', '');
Expand Down
Loading