Skip to content

Commit

Permalink
Auto-select web server port (for Ubuntu); --port option for PiPedalCo…
Browse files Browse the repository at this point in the history
…nfig
  • Loading branch information
rerdavies committed Nov 24, 2024
1 parent 96df3ac commit 8787073
Show file tree
Hide file tree
Showing 23 changed files with 244 additions and 94 deletions.
2 changes: 1 addition & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"/usr/lib",
"~/src/vst3sdk"
],
"compilerPath": "/usr/bin/gcc",
"compilerPath": "/usr/bin/gcc-12",
"cStandard": "c17",
"cppStandard": "c++20",
"intelliSenseMode": "linux-gcc-arm64",
Expand Down
48 changes: 25 additions & 23 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -266,23 +266,20 @@
}
]
},


{
"name": "(gdb) processCopyrights Launch",
"name": "(gdb) pipedalconfigX",
"type": "cppdbg",
"request": "launch",
// Resolved by CMake Tools:
"program": "${command:cmake.launchTargetPath}",
///"args": [ "[lv2host_leak]" ],

"args": [
"--projectCopyright",
"debian/copyright",
"--output",
"/tmp/copyrights.txt",
"liblilv-0-0", "lv2-dev", "libsdbus-c++-dev", "librsvg2-2", "libpango-1.0-0", "libx11-6", "libxrandr2"

"program": "/home/robin/src/pipedal/build/src/pipedalconfig",
"args": [
"--nosudo", // run without sudo (which will fail because of perms, but allow us to debug deeper into install code.)
//"--get-current-port"
// "--uninstall"
//"--enable-p2p" , "CA", "PiPedalTest","12345678","14"
// "--alsa-devices"
"--prefix", "/usr",
"--install", "--port", "0"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
Expand All @@ -296,8 +293,7 @@
"value": "detect_leaks=0"

},

{
{
"name": "OTHER_VALUE",
"value": "Something something"
}
Expand All @@ -312,18 +308,23 @@
}
]
},


{
"name": "(gdb) pipedalconfig",
"name": "(gdb) processCopyrights Launch",
"type": "cppdbg",
"request": "launch",
// Resolved by CMake Tools:
"program": "${command:cmake.launchTargetPath}",
"args": [
"--nosudo", // run without sudo (which will fail because of perms, but allow us to debug deeper into install code.)
//"--get-current-port"
// "--uninstall"
//"--enable-p2p" , "CA", "PiPedalTest","12345678","14"
"--alsa-devices"
///"args": [ "[lv2host_leak]" ],

"args": [
"--projectCopyright",
"debian/copyright",
"--output",
"/tmp/copyrights.txt",
"liblilv-0-0", "lv2-dev", "libsdbus-c++-dev", "librsvg2-2", "libpango-1.0-0", "libx11-6", "libxrandr2"

],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
Expand All @@ -337,7 +338,8 @@
"value": "detect_leaks=0"

},
{

{
"name": "OTHER_VALUE",
"value": "Something something"
}
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,6 @@
"pipedalshutdownd",
"pipedaltest",
"ToobAmp"
]
],
"C_Cpp.default.compilerPath": "/usr/bin/g++-13"
}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ endif()

set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Robin E. R. Davies<rerdavies@gmail.com>") # required
set(CPACK_PACKAGE_VENDOR "Robin Davies")
set(CPACK_PACKAGE_VENDOR "Robin E. R. Davies")
set(CPACK_PACKAGE_DESCRIPTION "IoT guitar effect pedal for Raspberry Pi, with phone-friendly web interface.")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "IoT guitar effect pedal for Raspberry Pi")
set(CPACK_DEBIAN_PACKAGE_SECTION sound)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2021-2024 Robin Davies
Copyright 2021-2024 Robin E. R. Davies

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
Expand Down
2 changes: 1 addition & 1 deletion NetworkManagerP2P/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ using namespace std;
static void PrintHelp()
{
cout << "nm-pipedal-p2p - P2P Manager for NetworkManager network stack." << endl
<< "Copyright (c) 2024 Robin Davies." << endl
<< "Copyright (c) 2024 Robin E. R. Davies." << endl
<< endl
<< "Provides P2P connections on LINUX distributions that use NetworkManager." << endl
<< endl
Expand Down
2 changes: 1 addition & 1 deletion NetworkManagerP2P/src/ss.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2022 Robin Davies
// Copyright (c) 2022 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion PiPedalCommon/src/HtmlHelper.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2022 Robin Davies
// Copyright (c) 2022 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion PiPedalCommon/src/Lv2Log.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2022 Robin Davies
// Copyright (c) 2022 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion PiPedalCommon/src/NetLinkChannelInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2007, 2008 Johannes Berg
Copyright (c) 2007 Andy Lutomirski
Copyright (c) 2007 Mike Kershaw
Copyright (c) 2008 Luis R. Rodriguez
Copyright (c) 2024 Robin Davies
Copyright (c) 2024 Robin E. R. Davies
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion PiPedalCommon/src/NetLinkChannelInfo.cpp.bak
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2007, 2008 Johannes Berg
Copyright (c) 2007 Andy Lutomirski
Copyright (c) 2007 Mike Kershaw
Copyright (c) 2008 Luis R. Rodriguez
Copyright (c) 2024 Robin Davies
Copyright (c) 2024 Robin E. R. Davies
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion PiPedalCommon/src/json.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2022 Robin Davies
// Copyright (c) 2022 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
10 changes: 5 additions & 5 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: pipedal
Upstream-Contact: Robin Davies <rerdavies@gmail.com>
Upstream-Contact: Robin E. R. Davies <rerdavies@gmail.com>
Source: https://www.example.com/software/project

Files: *
Copyright: 2021, Robin Davies
Copyright: 2021, Robin E. R. Davies
License: Expat

Files: src/*
Copyright: 2021, Robin Davies
Copyright: 2021, Robin E. R. Davies
License: Expat


Files: react/src
Copyright: 2020, Robin Davies.
Copyright: 2020, Robin E. R. Davies.
License: Expat

Files: src/Lv2EventBufferWriter.hpp
Copyright: 2008-2014, David Robillard <d@drobilla.net>
2021, Robin Davies
2021, Robin E. R. Davies
License: ISC and Expat

Files: react/node_modules/@babel/*
Expand Down
4 changes: 2 additions & 2 deletions debian/fill.copyright.blanks.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
/:
license: Expat
copyright: 2021, Robin Davies.
copyright: 2021, Robin E. R. Davies.

src/react/:
license: Expat
copyright: 2021, Robin Davies.
copyright: 2021, Robin E. R. Davies.

react/node_modules/webpack/:
license: Expat
Expand Down
2 changes: 1 addition & 1 deletion docs/LicensePiPedal.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2021-2024 Robin Davies
Copyright 2021-2024 Robin E. R. Davies

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
Expand Down
2 changes: 1 addition & 1 deletion docs/LicenseToobAmp.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2021-2023 Robin Davies
Copyright 2021-2023 Robin E. R. Davies

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
Expand Down
2 changes: 1 addition & 1 deletion react/src/PiPedalModel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ export class PiPedalModel //implements PiPedalModel
try {
await this.webSocket.connect();
} catch (error) {
this.setError("Failed to connect to server. (" + getErrorMessage(error));
this.setError("Failed to connect to server. " + getErrorMessage(error) );
return false;

}
Expand Down
4 changes: 2 additions & 2 deletions react/src/PiPedalSocket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class PiPedalSocket {
ws.onerror = (evt: Event) => {
ws.onclose = null;
ws.onerror = null;
reject("Failed to connect.");
reject("Connection not accepted.");
};
ws.onopen = (event: Event) => {
ws.onerror = self.handleError.bind(self);
Expand All @@ -290,7 +290,7 @@ class PiPedalSocket {
resolve(ws);
};
} catch (e: any){
reject("Failed to connect. " + e.toString());
reject("Failed to connect: " + e.toString());
};
});
}
Expand Down
1 change: 1 addition & 0 deletions src/AvahiService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ void AvahiService::EntryGroupCallback(AvahiEntryGroup *g, AvahiEntryGroupState s
char *n = avahi_alternative_service_name(avahiNameString);
avahi_free(avahiNameString);
avahiNameString = n;
this->serviceName = n;
Lv2Log::warning(SS("Service name collision, renaming service to '" << avahiNameString << "'\n"));
/* And recreate the services */
create_group(avahi_entry_group_get_client(g));
Expand Down
Loading

0 comments on commit 8787073

Please sign in to comment.