Misc. Ubuntu fixes.
This commit is contained in:
@@ -4,7 +4,7 @@ Run the following commands to install build tools required by the PiPedal build.
|
|||||||
|
|
||||||
# install CMake
|
# install CMake
|
||||||
sudo apt updatee
|
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
|
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`:
|
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.
@@ -41,7 +41,6 @@ export default class VirtualKeyboardHandler
|
|||||||
this.virtualKeyboard = navigator["virtualKeyboard"];
|
this.virtualKeyboard = navigator["virtualKeyboard"];
|
||||||
if (this.virtualKeyboard)
|
if (this.virtualKeyboard)
|
||||||
{
|
{
|
||||||
alert("Has Virtual keyboard!");
|
|
||||||
this.virtualKeyboard.addEventListener("geometryChange",this.handleGeometryChange);
|
this.virtualKeyboard.addEventListener("geometryChange",this.handleGeometryChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ void AvahiService::create_group(AvahiClient *c)
|
|||||||
* because it was reset previously, add our entries. */
|
* because it was reset previously, add our entries. */
|
||||||
if (this->makeAnnouncement && avahi_entry_group_is_empty(group))
|
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);
|
std::string instanceTxtRecord = SS("id=" << this->instanceId);
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -121,10 +121,10 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
|
|||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
elseif(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
||||||
message(STATUS "RelWithgDebInfo build")
|
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()
|
else()
|
||||||
message(STATUS "Release build")
|
message(STATUS "Release build")
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -DNDEBUG" )
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DNDEBUG" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_BACKTRACE)
|
if (ENABLE_BACKTRACE)
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ void HotspotManagerImpl::onStartMonitoring()
|
|||||||
ethernetDevice = GetDevice(NM_DEVICE_TYPE_ETHERNET);
|
ethernetDevice = GetDevice(NM_DEVICE_TYPE_ETHERNET);
|
||||||
if (!ethernetDevice)
|
if (!ethernetDevice)
|
||||||
{
|
{
|
||||||
throw std::runtime_error("eth0 device not found.");
|
throw std::runtime_error("ethernet device not found.");
|
||||||
}
|
}
|
||||||
this->ethernetDevice->OnStateChanged.add(
|
this->ethernetDevice->OnStateChanged.add(
|
||||||
[this](uint32_t, uint32_t, uint32_t)
|
[this](uint32_t, uint32_t, uint32_t)
|
||||||
|
|||||||
@@ -93,11 +93,13 @@ PiPedalVersion::PiPedalVersion(PiPedalModel&model)
|
|||||||
|
|
||||||
this->webAddresses_.push_back(MakeWebAddress(SS(hostName << ".local"),port));
|
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ðAddress: 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");
|
std::string wlanAddr = GetInterfaceIpv4Address("wlan0");
|
||||||
if (wlanAddr.length() != 0)
|
if (wlanAddr.length() != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ static void SetPriority(int realtimePriority, int nicePriority, const char *prio
|
|||||||
int result = nice(nicePriority);
|
int result = nice(nicePriority);
|
||||||
if (result == -1)
|
if (result == -1)
|
||||||
{
|
{
|
||||||
Lv2Log::error(SS("Failed Failed to set thread priority. (" << priorityName << ")"));
|
Lv2Log::error(SS("Failed to set thread priority. (" << priorityName << ")"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -576,7 +576,7 @@ static std::string getIpv4Address(const std::string interface)
|
|||||||
/* I want to get an IPv4 IP address */
|
/* I want to get an IPv4 IP address */
|
||||||
ifr.ifr_addr.sa_family = AF_INET;
|
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);
|
strncpy(ifr.ifr_name, interface.c_str(), IFNAMSIZ - 1);
|
||||||
|
|
||||||
int result = ioctl(fd, SIOCGIFADDR, &ifr);
|
int result = ioctl(fd, SIOCGIFADDR, &ifr);
|
||||||
@@ -1413,10 +1413,11 @@ void WebServerImpl::DisplayIpAddresses()
|
|||||||
ss << "Listening on mDns address " << hostName << ":" << this->port;
|
ss << "Listening on mDns address " << hostName << ":" << this->port;
|
||||||
Lv2Log::info(ss.str());
|
Lv2Log::info(ss.str());
|
||||||
}
|
}
|
||||||
std::string ipv4Address = getIpv4Address("eth0");
|
auto ethAddresses = GetEthernetIpv4Addresses();
|
||||||
if (ipv4Address.length() != 0)
|
for (const autoðAddress: ethAddresses)
|
||||||
{
|
{
|
||||||
Lv2Log::info(SS("Listening on eth0 address " << ipv4Address << ":" << this->port));
|
Lv2Log::info(SS("Listening on " << ethAddress << ":" << this->port));
|
||||||
|
|
||||||
}
|
}
|
||||||
std::string wifiAddress = getIpv4Address("wlan0");
|
std::string wifiAddress = getIpv4Address("wlan0");
|
||||||
if (wifiAddress.length() != 0)
|
if (wifiAddress.length() != 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user