From fd7d1dfa740188d2fa580be66a8979e265adbb32 Mon Sep 17 00:00:00 2001 From: PAJohnson Date: Mon, 28 Sep 2020 05:06:12 -0400 Subject: [PATCH] Changed name of Config dashboard to Tuning. Added ActionEnum component. --- GUI/server/odrive_server.py | 2 + GUI/src/App.vue | 2 +- ...{Config_0_4_12.json => Tuning_0_4_12.json} | 84 ++++++++++------ .../{Config_0_5_1.json => Tuning_0_5_1.json} | 84 ++++++++++------ GUI/src/components/actions/Action.vue | 11 ++- GUI/src/components/actions/ActionEnum.vue | 95 +++++++++++++++++++ GUI/src/components/controls/CtrlBoolean.vue | 19 +++- GUI/src/components/controls/CtrlEnum.vue | 8 +- GUI/src/components/controls/CtrlNumeric.vue | 12 ++- GUI/src/components/controls/CtrlSlider.vue | 6 +- GUI/src/store.js | 19 ++-- GUI/src/views/Dashboard.vue | 28 ++++-- GUI/src/views/Wizard.vue | 79 +++++++++------ 13 files changed, 337 insertions(+), 112 deletions(-) rename GUI/src/assets/dashboards/{Config_0_4_12.json => Tuning_0_4_12.json} (58%) rename GUI/src/assets/dashboards/{Config_0_5_1.json => Tuning_0_5_1.json} (58%) create mode 100644 GUI/src/components/actions/ActionEnum.vue diff --git a/GUI/server/odrive_server.py b/GUI/server/odrive_server.py index 778a8623..717c5f40 100644 --- a/GUI/server/odrive_server.py +++ b/GUI/server/odrive_server.py @@ -4,6 +4,7 @@ import os from flask import make_response, request, jsonify, session from flask_socketio import SocketIO, send, emit from flask_cors import CORS +from engineio.payload import Payload import json import time import argparse @@ -20,6 +21,7 @@ app.config.update( SESSION_COOKIE_SAMESITE='None' ) CORS(app, support_credentials=True) +Payload.max_decode_packets = 100 socketio = SocketIO(app, cors_allowed_origins="*", async_mode = "threading") def get_all_odrives(): diff --git a/GUI/src/App.vue b/GUI/src/App.vue index 4b1f98d8..ce2ae06e 100644 --- a/GUI/src/App.vue +++ b/GUI/src/App.vue @@ -35,7 +35,7 @@ - {{path}}: + {{shortPath}}:
- +
@@ -30,6 +30,13 @@ export default { this.value = this.initVal; } }, + computed: { + shortPath() { + let keys = this.path.split('.'); + keys.shift(); + return keys.join('.'); + } + }, methods: { newVal: function (e) { let input = e.target.value; diff --git a/GUI/src/components/actions/ActionEnum.vue b/GUI/src/components/actions/ActionEnum.vue new file mode 100644 index 00000000..96662bdb --- /dev/null +++ b/GUI/src/components/actions/ActionEnum.vue @@ -0,0 +1,95 @@ + + + + + \ No newline at end of file diff --git a/GUI/src/components/controls/CtrlBoolean.vue b/GUI/src/components/controls/CtrlBoolean.vue index 8bdc7f31..e2286b8f 100644 --- a/GUI/src/components/controls/CtrlBoolean.vue +++ b/GUI/src/components/controls/CtrlBoolean.vue @@ -3,7 +3,8 @@ {{name}}:
- {{value}} + {{value}} + {{fakeValue}} diff --git a/GUI/src/components/controls/CtrlEnum.vue b/GUI/src/components/controls/CtrlEnum.vue index d5bbf8c0..98decc9b 100644 --- a/GUI/src/components/controls/CtrlEnum.vue +++ b/GUI/src/components/controls/CtrlEnum.vue @@ -3,7 +3,6 @@ {{name}}:
-