diff --git a/images/preview.jpg b/images/preview.jpg index bf41c85..c22a885 100644 Binary files a/images/preview.jpg and b/images/preview.jpg differ diff --git a/server/.gitignore b/server/.gitignore new file mode 100644 index 0000000..1e96583 --- /dev/null +++ b/server/.gitignore @@ -0,0 +1,131 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ +package-lock.json + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* diff --git a/server/package.json b/server/package.json index f52d3d9..a019d2a 100644 --- a/server/package.json +++ b/server/package.json @@ -18,7 +18,11 @@ "pkg": { "scripts": "main.js", "assets": "www/**", - "targets": ["node14-windows-x64", "node14-linux-x64", "node14-linux-armv7" ], + "targets": [ + "node14-windows-x64", + "node14-linux-x64", + "node14-linux-armv7" + ], "outputPath": "build" } } diff --git a/server/www/classes/DataSerie.js b/server/www/classes/DataSerie.js index c2735d6..898a11e 100644 --- a/server/www/classes/DataSerie.js +++ b/server/www/classes/DataSerie.js @@ -188,6 +188,7 @@ function getSerieInstanceFromTelemetry(telemetryName) throw new Error(`Trying to instanciate a DataSerie from a non existant telemetry name : ${telemetryName}`); serie.name = telemetryName; + serie.colored_name = ansi_coloring.ansi_to_html(telemetryName); serie.values = telemetry.values; // this way, serie.values always equals telemetry.values serie.unit = telemetry.unit; serie.type = telemetry.type; diff --git a/server/www/classes/Telemetry.js b/server/www/classes/Telemetry.js index e124766..dcd8f5e 100644 --- a/server/www/classes/Telemetry.js +++ b/server/www/classes/Telemetry.js @@ -2,6 +2,7 @@ class Telemetry{ constructor(_name, unit = undefined, type = "number"){ this.type = type; // either "number", "text", "3D" or "xy" this.name = _name; + this.colored_name = ansi_coloring.ansi_to_html(_name); this.unit = ( unit != "" ) ? unit : undefined; this.usageCount = 0; @@ -22,7 +23,7 @@ class Telemetry{ // this is what will be displayed on the left pannel next to the telem name, // it is either the current value of the telem (number), or its text or the type of the shape ... this.values_formatted = ""; - + this.colored_values_formatted =""; if (this.type == "3D") this.setShapeTypeDelay(); @@ -94,6 +95,6 @@ class Telemetry{ { this.values_formatted = ""; } - + this.colored_values_formatted = ansi_coloring.ansi_to_html(this.values_formatted); } } \ No newline at end of file diff --git a/server/www/classes/communication/serverMessageReading.js b/server/www/classes/communication/serverMessageReading.js index ac1744f..261d6f3 100644 --- a/server/www/classes/communication/serverMessageReading.js +++ b/server/www/classes/communication/serverMessageReading.js @@ -103,10 +103,20 @@ function parseVariablesData(msg, now) } // Extract values array - let values = msg.substring(startIdx+1, endIdx).split(';') let xArray = []; let yArray = []; let zArray = []; + + //If it contains the text flag (singleValue or |t), then ignore ; + let values; + if(isTextFormatTelem) + { + values = msg.substring(startIdx+1, endIdx).split() + + }else{ + values = msg.substring(startIdx+1, endIdx).split(';') + } + for(let value of values) { /* All possibilities : diff --git a/server/www/classes/view/logs/LogConsole.js b/server/www/classes/view/logs/LogConsole.js index 1099c82..0e74b95 100644 --- a/server/www/classes/view/logs/LogConsole.js +++ b/server/www/classes/view/logs/LogConsole.js @@ -61,7 +61,7 @@ class LogConsole if (currLog == undefined) return; - el.innerHTML = currLog.text; + el.innerHTML = ansi_coloring.ansi_to_html(currLog.text); el.addEventListener("mouseover", function () { diff --git a/server/www/components/singleValue/singleValue.js b/server/www/components/singleValue/singleValue.js index 620c6d4..456fb6e 100644 --- a/server/www/components/singleValue/singleValue.js +++ b/server/www/components/singleValue/singleValue.js @@ -26,7 +26,6 @@ computed: { else return "Click to change precision"; } - }, methods: { onContainerResized() @@ -40,6 +39,9 @@ methods: { if (this.$refs.value_responsive_text2 != undefined) this.$refs.value_responsive_text2.triggerTextResize(); this.$refs.unit_responsive_text.triggerTextResize(); + }, + ansi_to_html(txt){ + return ansi_coloring.ansi_to_html(txt); } }, mounted() { @@ -61,17 +63,18 @@ updated() { unmounted(){ resizeObserverForSingleValue.unobserve(singleValueContainer); }, + template:'\