Misc. Ubuntu fixes.

This commit is contained in:
Robin E. R. Davies
2024-11-23 12:49:43 -05:00
parent b64c86af04
commit e79589e009
9 changed files with 16 additions and 14 deletions
+1 -1
View File
@@ -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`:
Binary file not shown.
-1
View File
@@ -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);
}
}
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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)
+5 -3
View File
@@ -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)
{
+1 -1
View File
@@ -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 << ")"));
}
}
+5 -4
View File
@@ -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);
@@ -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)