Skip to content

Commit

Permalink
Misc. Ubuntu fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rerdavies committed Nov 23, 2024
1 parent b64c86a commit e79589e
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/BuildPrerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Run the following commands to install build tools required by the PiPedal build.

# install CMake
sudo apt updatee
sudo apt install -y cmake ninja-build gcc git
sudo apt install -y cmake ninja-build build-essential g++ git

The PiPedal build process also requires version 12 or later of `node.js`. Type `node --version` to see if you have a version
of `node.js` installed already. Otherwise run the following commands as root to install the v14.x lts version of `node.js`:
Expand Down
Binary file removed lv2/x86_64/toobamp_1.1.53_amd64.deb
Binary file not shown.
1 change: 0 additions & 1 deletion react/src/VirtualKeyboardHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export default class VirtualKeyboardHandler
this.virtualKeyboard = navigator["virtualKeyboard"];
if (this.virtualKeyboard)
{
alert("Has Virtual keyboard!");
this.virtualKeyboard.addEventListener("geometryChange",this.handleGeometryChange);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/AvahiService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void AvahiService::create_group(AvahiClient *c)
* because it was reset previously, add our entries. */
if (this->makeAnnouncement && avahi_entry_group_is_empty(group))
{
Lv2Log::debug(SS("Adding service '" << avahiNameString << "'"));
Lv2Log::debug(SS("Adding service '" << serviceName << "'"));

std::string instanceTxtRecord = SS("id=" << this->instanceId);

Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
endif()
elseif(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
message(STATUS "RelWithgDebInfo build")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -DNDEBUG" )
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 -DNDEBUG" )
else()
message(STATUS "Release build")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -DNDEBUG" )
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DNDEBUG" )
endif()

if (ENABLE_BACKTRACE)
Expand Down
2 changes: 1 addition & 1 deletion src/HotspotManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ void HotspotManagerImpl::onStartMonitoring()
ethernetDevice = GetDevice(NM_DEVICE_TYPE_ETHERNET);
if (!ethernetDevice)
{
throw std::runtime_error("eth0 device not found.");
throw std::runtime_error("ethernet device not found.");
}
this->ethernetDevice->OnStateChanged.add(
[this](uint32_t, uint32_t, uint32_t)
Expand Down
8 changes: 5 additions & 3 deletions src/PiPedalVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,13 @@ PiPedalVersion::PiPedalVersion(PiPedalModel&model)

this->webAddresses_.push_back(MakeWebAddress(SS(hostName << ".local"),port));

std::string ethAddr = GetInterfaceIpv4Address("eth0");
if (ethAddr.length() != 0)

auto ethAddresses = GetEthernetIpv4Addresses();
for (const std::string&ethAddress: ethAddresses)
{
this->webAddresses_.push_back(MakeWebAddress(ethAddr,port));
this->webAddresses_.push_back(MakeWebAddress(ethAddress,port));
}
// yyx: fix this for ubuntu.
std::string wlanAddr = GetInterfaceIpv4Address("wlan0");
if (wlanAddr.length() != 0)
{
Expand Down
2 changes: 1 addition & 1 deletion src/SchedulerPriority.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static void SetPriority(int realtimePriority, int nicePriority, const char *prio
int result = nice(nicePriority);
if (result == -1)
{
Lv2Log::error(SS("Failed Failed to set thread priority. (" << priorityName << ")"));
Lv2Log::error(SS("Failed to set thread priority. (" << priorityName << ")"));
}
}

Expand Down
9 changes: 5 additions & 4 deletions src/WebServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ static std::string getIpv4Address(const std::string interface)
/* I want to get an IPv4 IP address */
ifr.ifr_addr.sa_family = AF_INET;

/* I want an IP address attached to "eth0" */
/* I want an IP address attached to "ethernet" */
strncpy(ifr.ifr_name, interface.c_str(), IFNAMSIZ - 1);

int result = ioctl(fd, SIOCGIFADDR, &ifr);
Expand Down Expand Up @@ -1413,10 +1413,11 @@ void WebServerImpl::DisplayIpAddresses()
ss << "Listening on mDns address " << hostName << ":" << this->port;
Lv2Log::info(ss.str());
}
std::string ipv4Address = getIpv4Address("eth0");
if (ipv4Address.length() != 0)
auto ethAddresses = GetEthernetIpv4Addresses();
for (const auto&ethAddress: ethAddresses)
{
Lv2Log::info(SS("Listening on eth0 address " << ipv4Address << ":" << this->port));
Lv2Log::info(SS("Listening on " << ethAddress << ":" << this->port));

}
std::string wifiAddress = getIpv4Address("wlan0");
if (wifiAddress.length() != 0)
Expand Down

0 comments on commit e79589e

Please sign in to comment.