[code-cs] add crankshaft plug/unplug scripts
This commit is contained in:
parent
88f61a3c4d
commit
df8f8f6cb4
@ -98,6 +98,10 @@ void App::stop()
|
||||
void App::aoapDeviceHandler(aasdk::usb::DeviceHandle deviceHandle)
|
||||
{
|
||||
OPENAUTO_LOG(info) << "[App] Device connected.";
|
||||
#ifdef RASPBERRYPI3
|
||||
system("/opt/crankshaft/dumb_suid usb_plug.sh &");
|
||||
OPENAUTO_LOG(info) << "[CS] Ran USB Plug script.";
|
||||
#endif
|
||||
|
||||
if(androidAutoEntity_ == nullptr)
|
||||
{
|
||||
@ -154,6 +158,11 @@ void App::onAndroidAutoQuit()
|
||||
androidAutoEntity_->stop();
|
||||
androidAutoEntity_.reset();
|
||||
|
||||
#ifdef RASPBERRYPI3
|
||||
system("/opt/crankshaft/dumb_suid usb_unplug.sh &");
|
||||
OPENAUTO_LOG(info) << "[CS] Ran USB Unplug script.";
|
||||
#endif
|
||||
|
||||
if(!isStopped_)
|
||||
{
|
||||
this->waitForDevice();
|
||||
|
Loading…
x
Reference in New Issue
Block a user