diff --git a/.vscode/launch.json b/.vscode/launch.json index 1bc3a2b..d459cd3 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,33 +11,6 @@ "version": "0.2.0", "configurations": [ - { - "name": "Attach to Edge", - "port": 9222, - "request": "attach", - "type": "msedge", - "webRoot": "${workspaceFolder}" - }, - { - "name": "(gdb) Attach", - "type": "cppdbg", - "request": "attach", - "program": "enter program name, for example ${workspaceFolder}/a.out", - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - }, - { - "description": "Set Disassembly Flavor to Intel", - "text": "-gdb-set disassembly-flavor intel", - "ignoreFailures": true - } - ] - }, - @@ -67,57 +40,6 @@ } ] }, - { - "name": "(gdb) makeRelease", - "type": "cppdbg", - "request": "launch", - // Resolved by CMake Tools: - "program": "${command:cmake.launchTargetPath}", - "args": [ ], - "stopAtEntry": false, - "cwd": "${workspaceFolder}/../..", - "environment": [ - { - "name": "PATH", - "value": "$PATH:${command:cmake.launchTargetDirectory}" - } - ], - "externalConsole": true, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ] - }, - { - "name": "(gdb) downloadCounts", - "type": "cppdbg", - "request": "launch", - // Resolved by CMake Tools: - "program": "${command:cmake.launchTargetPath}", - "args": [ "--downloads" ], - "stopAtEntry": false, - "cwd": "${workspaceFolder}/../..", - "environment": [ - { - "name": "PATH", - "value": "$PATH:${command:cmake.launchTargetDirectory}" - } - ], - "externalConsole": true, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ] - }, - { "name": "(gdb) pipedal_nm_p2pd", "type": "cppdbg", @@ -174,13 +96,7 @@ "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true - }, - { - "description": "Add alsa source directories.", - "text": "directory $cd:$cwd:/usr/src/alsa-lib-1.2.8", - "ignoreFailures": true } - ] }, @@ -196,7 +112,7 @@ //"[json_variants]" // subtest of your choice, or none to run all of the tests. //"[inverting_mutex_test]" // "[utf8_to_utf32]" - "[updater]" + "[wifi_channels_test]" ], "stopAtEntry": false, @@ -256,38 +172,6 @@ } ] }, - { - "name": "(gdb) profilePlugin Launch", - "type": "cppdbg", - "request": "launch", - // Resolved by CMake Tools: - "program": "${command:cmake.launchTargetPath}", - - "args": [ "ToobNam_Profile", "--no-profile","-w" ], - - "stopAtEntry": false, - "cwd": "${workspaceFolder}", - "environment": [ - { - "name": "PATH", - "value": "$PATH:${command:cmake.launchTargetDirectory}" - }, - { - "name": "OTHER_VALUE", - "value": "Something something" - } - ], - "externalConsole": false, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ] - }, - { @@ -373,15 +257,11 @@ // Resolved by CMake Tools: "program": "${command:cmake.launchTargetPath}", "args": [ - "--prefix", - "/usr/sbin", "--nosudo", // run without sudo (which will fail because of perms, but allow us to debug deeper into install code.) - "--install" - //"--get-current-port" - //"--install" + // "--uninstall" //"--enable-p2p" , "CA", "PiPedalTest","12345678","14" - //"--list-p2p-channels" + "--list-p2p-channels" ], "stopAtEntry": false, "cwd": "${workspaceFolder}", diff --git a/.vscode/settings.json b/.vscode/settings.json index efc34fd..b305b9b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -97,7 +97,8 @@ "strstream": "cpp", "p2p_i.h": "c", "p2p.h": "c", - "hash_set": "cpp" + "hash_set": "cpp", + "barrier": "cpp" }, "cSpell.words": [ "Guitarix", diff --git a/PiPedalCommon/src/CMakeLists.txt b/PiPedalCommon/src/CMakeLists.txt index f95dc77..80e2108 100644 --- a/PiPedalCommon/src/CMakeLists.txt +++ b/PiPedalCommon/src/CMakeLists.txt @@ -14,7 +14,7 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") if (CMAKE_BUILD_TYPE MATCHES Debug) message(STATUS "Debug build") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -DDEBUG" ) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -DDEBUG -D_GLIBCXX_DEBUG" ) endif() # Can't get the pkg_check to work. diff --git a/PiPedalCommon/src/WifiConfigSettings.cpp b/PiPedalCommon/src/WifiConfigSettings.cpp index 399a6a6..1cc1da6 100644 --- a/PiPedalCommon/src/WifiConfigSettings.cpp +++ b/PiPedalCommon/src/WifiConfigSettings.cpp @@ -680,7 +680,7 @@ void WifiConfigSettings::ParseArguments( ) { - this->valid_ = false; + this->valid_ = false ; if (argv.size() != 4) { throw invalid_argument("Invalid number of arguments."); diff --git a/react/src/AndroidHost.tsx b/react/src/AndroidHost.tsx index f62c931..10b8065 100644 --- a/react/src/AndroidHost.tsx +++ b/react/src/AndroidHost.tsx @@ -61,3 +61,10 @@ export class FakeAndroidHost implements AndroidHostInterface return this.theme; } } +export function isAndroidHosted(): boolean { + return ((window as any).AndroidHost as AndroidHostInterface) !== undefined; +} + +export function getAndroidHost(): AndroidHostInterface | undefined { + return ((window as any).AndroidHost as AndroidHostInterface); +} \ No newline at end of file diff --git a/react/src/PiPedalModel.tsx b/react/src/PiPedalModel.tsx index a192c9e..6a7ad4a 100644 --- a/react/src/PiPedalModel.tsx +++ b/react/src/PiPedalModel.tsx @@ -624,7 +624,7 @@ export class PiPedalModel //implements PiPedalModel let atomJson = body.atomJson as any; this.handleNotifyPathPatchPropertyChanged(instanceId, propertyUri, atomJson); if (header.replyTo) { - this.webSocket?.reply(header.replyTo, "onNotifyPatchProperty", true); + this.webSocket?.reply(header.replyTo, "onNotifyPathPatchPropertyChanged", true); } } else if (message === "onNotifyPatchProperty") { let clientHandle = body.clientHandle as number; diff --git a/react/src/SettingsDialog.tsx b/react/src/SettingsDialog.tsx index f983fdf..d5ab736 100644 --- a/react/src/SettingsDialog.tsx +++ b/react/src/SettingsDialog.tsx @@ -51,6 +51,7 @@ import SelectThemeDialog from './SelectThemeDialog'; import Slide, { SlideProps } from '@mui/material/Slide'; import { createStyles, Theme } from '@mui/material/styles'; import { WithStyles, withStyles } from '@mui/styles'; +import { canScaleWindow, getWindowScaleText } from './WindowScale'; @@ -466,8 +467,15 @@ const SettingsDialog = withStyles(styles, { withTheme: true })( midiSummary(): string { let ports = this.state.jackSettings.inputMidiDevices; if (ports.length === 0) return "Disabled"; - if (ports.length === 1) return ports[0].description; - return ports.length + " channels"; + + let result = ""; + for (let port of ports) { + if (result.length !== 0) { + result += ", "; + } + result += port.description; + } + return result; } handleShowWifiConfigDialog() { this.setState({ @@ -571,7 +579,7 @@ const SettingsDialog = withStyles(styles, { withTheme: true })( (