Skip to content

Commit

Permalink
Merge pull request #190 from rerdavies/dev
Browse files Browse the repository at this point in the history
v1.2.46
  • Loading branch information
rerdavies authored Sep 3, 2024
2 parents abb8a1a + 7cdd32b commit b1b4289
Show file tree
Hide file tree
Showing 53 changed files with 1,063 additions and 653 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
sudo apt install libasound2-dev
sudo apt install libwebsocketpp-dev authbind
sudo apt install libsdbus-c++-dev libsdbus-c++-bin
sudo apt install libavahi-client-dev libzip-dev libicu-dev
sudo apt install libavahi-client-dev libzip-dev libicu-dev apt
git submodule update --init --recursive
./react-config
Expand Down
32 changes: 32 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,38 @@
}
]
},
{
"name": "(gdb) profilePlugin Launch",
"type": "cppdbg",
"request": "launch",
// Resolved by CMake Tools:
"program": "${command:cmake.launchTargetPath}",

"args": [ "Nam_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
}
]
},



{
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.16.0)
project(pipedal
VERSION 1.2.45
VERSION 1.2.47
DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi"
HOMEPAGE_URL "https://rerdavies.github.io/pipedal"
)
set (DISPLAY_VERSION "PiPedal v1.2.45-Release")
set (DISPLAY_VERSION "PiPedal v1.2.47-Release")
set (PACKAGE_ARCHITECTURE "arm64")
set (CMAKE_INSTALL_PREFIX "/usr/")

Expand Down
3 changes: 2 additions & 1 deletion NetworkManagerP2P/src/DBusLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <stdexcept>
#include "ss.hpp"
#include <chrono>
#include "ofstream_synced.hpp"


namespace impl {
Expand Down Expand Up @@ -72,7 +73,7 @@ class FileDBusLogger : public IDBusLogger {
f << "trace: " << message << std::endl;
}
private:
std::ofstream f;
pipedal::ofstream_synced f;
};

class SystemdDBusLogger : public IDBusLogger {
Expand Down
5 changes: 3 additions & 2 deletions NetworkManagerP2P/src/NMP2pSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "ChannelInfo.hpp"
#include "DBusLog.hpp"
#include <sys/stat.h>
#include "ofstream_synced.hpp"

using namespace pipedal;
P2pSettings::P2pSettings(const std::filesystem::path&configDirectoryPath, const std::filesystem::path&varDirectoryPath)
Expand Down Expand Up @@ -193,7 +194,7 @@ void P2pSettings::Load()
}

static void openWithPerms(
std::ofstream &f,
pipedal::ofstream_synced &f,
const std::filesystem::path &path,
std::filesystem::perms perms =
std::filesystem::perms::owner_read | std::filesystem::perms::owner_write |
Expand Down Expand Up @@ -221,7 +222,7 @@ void P2pSettings::Save()
{
auto filename = config_filename();
try {
std::ofstream f;
pipedal::ofstream_synced f;
openWithPerms(f,filename);

if (!f.is_open())
Expand Down
1 change: 1 addition & 0 deletions PiPedalCommon/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ message(STATUS "NMPIPEDAL CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")

# Use the sdbus-c++ target in SDBusCpp namespace
add_library(PiPedalCommon STATIC
ofstream_synced.cpp include/ofstream_synced.hpp
ConfigSerializer.cpp include/ConfigSerializer.hpp
WifiRegs.cpp include/WifiRegs.hpp
WifiRegulations.cpp include/WifiRegulations.hpp
Expand Down
3 changes: 2 additions & 1 deletion PiPedalCommon/src/ServiceConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <unistd.h>
#include <sys/stat.h>
#include <tuple>
#include "ofstream_synced.hpp"

using namespace pipedal;

Expand Down Expand Up @@ -65,7 +66,7 @@ void ServiceConfiguration::Save()
std::filesystem::create_directories(directory);

// make sure the file has correct permissions.
std::ofstream t;
pipedal::ofstream_synced t;
t.open(filename);
t.close();

Expand Down
3 changes: 2 additions & 1 deletion PiPedalCommon/src/WriteTemplateFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "WriteTemplateFile.hpp"
#include <fstream>
#include <stdexcept>
#include "ofstream_synced.hpp"

using namespace pipedal;

Expand All @@ -37,7 +38,7 @@ void pipedal::WriteTemplateFile(
const std::filesystem::path &inputFile,
const std::filesystem::path &outputFile)
{
std::ofstream out(outputFile);
pipedal::ofstream_synced out(outputFile);
std::ifstream in(inputFile);

if (!in.is_open())
Expand Down
3 changes: 2 additions & 1 deletion PiPedalCommon/src/include/ConfigSerializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "autoptr_vector.h"
#include <unordered_map>
#include <fstream>
#include "ofstream_synced.hpp"

namespace config_serializer
{
Expand Down Expand Up @@ -256,7 +257,7 @@ namespace config_serializer
}
void Save(const std::string &path)
{
std::ofstream f;
pipedal::ofstream_synced f;
f.open(path);
if (!f.is_open())
{
Expand Down
28 changes: 28 additions & 0 deletions PiPedalCommon/src/include/ofstream_synced.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

#pragma once

#include <fstream>

namespace pipedal
{
void FileSystemSync();

class ofstream_synced : public std::ofstream
{
public:
using super = std::ofstream;
ofstream_synced() {}

explicit ofstream_synced(const std::string &filename, ios_base::openmode mode = ios_base::out)
: std::ofstream(filename, mode)
{
}
explicit ofstream_synced(const char *filename, ios_base::openmode mode = ios_base::out)
: std::ofstream(filename, mode)
{
}
void close();
~ofstream_synced();
};

}
21 changes: 21 additions & 0 deletions PiPedalCommon/src/ofstream_synced.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "ofstream_synced.hpp"
#include "unistd.h"

using namespace pipedal;


void pipedal::FileSystemSync()
{
::sync();
}
void ofstream_synced::close() {
if (is_open())
{
super::close();
::sync();
}
}
ofstream_synced::~ofstream_synced()
{
ofstream_synced::close();
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<a href="https://rerdavies.github.io/pipedal/LicensePiPedal.html"><img src="https://img.shields.io/badge/MIT-MIT?label=license&color=%23808080"/></a>
<a href="https://github.com/rerdavies/pipedal/actions"><img src="https://img.shields.io/github/actions/workflow/status/rerdavies/pipedal/cmake.yml?branch=main"/></a>

Download:&nbsp;<a href='https://rerdavies.github.io/pipedal/download.html'>v1.2.45</a>
Download:&nbsp;<a href='https://rerdavies.github.io/pipedal/download.html'>v1.2.47</a>
Website:&nbsp;[https://rerdavies.github.io/pipedal](https://rerdavies.github.io/pipedal).
Documentation:&nbsp;[https://rerdavies.github.io/pipedal/Documentation.html](https://rerdavies.github.io/pipedal/Documentation.html).

&nbsp;

#### NEW version 1.2.45 Release, providing support for Raspberry Pi OS Bookworm. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.
#### NEW version 1.2.47 Release, providing support for Raspberry Pi OS Bookworm. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.

&nbsp;

Expand Down
2 changes: 1 addition & 1 deletion docs/BuildPrerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Run the following commands to install dependent libraries required by the PiPeda
sudo apt install -y authbind
sudo apt install -y libavahi-client-dev
sudo apt install -y libnm-dev libicu-dev
sudo apt install -y libsdbus-c++-dev libzip-dev
sudo apt install -y libsdbus-c++-dev libzip-dev google-perftools libgoogle-perftools-dev


### Installing Sources
Expand Down
6 changes: 3 additions & 3 deletions docs/Installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ page_icon: img/Install4.jpg

Download the most recent Debian (.deb) package for your platform:

- [Raspberry Pi OS bookworm (64-bit) v1.2.45](https://github.com/rerdavies/pipedal/releases/download/)
- [Raspberry Pi OS bookworm (64-bit) v1.2.47](https://github.com/rerdavies/pipedal/releases/download/)
- [Ubuntu/Raspberry Pi OS bullseyeye (64-bit) v1.2.31](https://github.com/rerdavies/pipedal/releases/download/v1.1.31/pipedal_1.1.31_arm64.deb)

Version 1.2.45 has not yet been tested on Ubuntu or Raspberry Pi OS bullseye. On these platforms, we recommend that you use version 1.1.31.
Version 1.2.47 has not yet been tested on Ubuntu or Raspberry Pi OS bullseye. On these platforms, we recommend that you use version 1.1.31.

Install the package by running

```
sudo apt update
cd ~/Downloads
sudo apt-get install pipedal_1.2.45_arm64.deb
sudo apt-get install pipedal_1.2.47_arm64.deb
```
Adjust accordingly if you have downloaded v1.1.31.

Expand Down
9 changes: 9 additions & 0 deletions docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Release Notes
## PiPedal 1.2.47 Release

This version fixes an significant and dangerous defect that may cause loss of presets, banks or configuration data if you remove power from your Raspberry Pi within up to five minutes of last saving data instead of performing an orderly shutdown or reboot. Users of PiPedal should upgrade immediately.

This release also fixes a significant performance issue with TooB Neural Amp Modeler.

Bug fixes:
- Explicity sync files to disk immiately after saving, so that they won't be lost if power is removed from the Raspberry Pi.
- Fixes a significant performance issue with TooB Neural Amp Modeler.

## PiPedal 1.2.45 Release

Expand Down
6 changes: 3 additions & 3 deletions docs/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

Download the most recent Debian (.deb) package for your platform:

- <a href="https://github.com/rerdavies/pipedal/releases/download/v1.2.45/pipedal_1.2.45_arm64.deb">Raspberry Pi OS Bookworm (64-bit) v1.2.45</a>
- <a href="https://github.com/rerdavies/pipedal/releases/download/v1.2.47/pipedal_1.2.47_arm64.deb">Raspberry Pi OS Bookworm (64-bit) v1.2.47</a>
- <a href="https://github.com/rerdavies/pipedal/releases/download/v1.1.31/pipedal_1.1.31_arm64.deb">Ubuntu 21.04 or Raspberry Pi OS bullseyeyeye (64-bit) v1.1.31</a>

v1.2.45 is does not currently support Ubuntu 21.04, or older versions of Raspberry Pi OS.
v1.2.47 is does not currently support Ubuntu 21.04, or older versions of Raspberry Pi OS.

Install the package by running

```
sudo apt update
cd ~/Downloads
sudo apt-get install ./pipedal_1.2.45_arm64.deb
sudo apt-get install ./pipedal_1.2.47_arm64.deb
```

Follow the instructions in [_Configuring PiPedal After Installation_](https://rerdavies.github.io/pipedal/Configuring.html) to complete the installation.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@


<img src="GithubBanner.png" width="100%"/>
<a href="Installing.html"><i>v1.2.45</i></a>
<a href="Installing.html"><i>v1.2.47</i></a>

&nbsp;

To download PiPedal, click [here](download.md).
To view PiPedal documentation, click [here](Documentation.md).


#### NEW version 1.2.45 Release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.
#### NEW version 1.2.47 Release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.

&nbsp;

Expand Down
2 changes: 1 addition & 1 deletion lv2/aarch64/ToobAmp.lv2/CabIR.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ cabir:impulseFile3
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ;
lv2:microVersion 45 ;
lv2:microVersion 47 ;
rdfs:comment """
TooB Cab IR is a convolution-based guitar cabinet impulse response simulator.
Expand Down
2 changes: 1 addition & 1 deletion lv2/aarch64/ToobAmp.lv2/CabSim.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ toob:frequencyResponseVector
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ;
lv2:microVersion 45 ;
lv2:microVersion 47 ;

mod:brand "TooB";
mod:label "TooB CabSim";
Expand Down
2 changes: 1 addition & 1 deletion lv2/aarch64/ToobAmp.lv2/ConvolutionReverb.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ toobimpulse:impulseFile
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ;
lv2:microVersion 45 ;
lv2:microVersion 47 ;
rdfs:comment """
Convolution reverb is a notoriously compute-intensive effect. If you are having performance issues, use the Max T control to constrain the length of the impulse file to
Expand Down
2 changes: 1 addition & 1 deletion lv2/aarch64/ToobAmp.lv2/ConvolutionReverbStereo.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ toobimpulse:impulseFile
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ;
lv2:microVersion 45 ;
lv2:microVersion 47 ;
rdfs:comment """
Expand Down
2 changes: 1 addition & 1 deletion lv2/aarch64/ToobAmp.lv2/InputStage.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ inputStage:filterGroup
doap:license <https://two-play.com/TooB/licenses/isc> ;
doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ;
lv2:microVersion 45 ;
lv2:microVersion 47 ;

mod:brand "TooB";
mod:label "TooB Input";
Expand Down
Loading

0 comments on commit b1b4289

Please sign in to comment.