Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cranskhaft with aasdk next #18

Open
wants to merge 2 commits into
base: crankshaft-ng
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions include/f1x/openauto/autoapp/App.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

#pragma once

#include <f1x/aasdk/USB/IUSBHub.hpp>
#include <f1x/aasdk/USB/IConnectedAccessoriesEnumerator.hpp>
#include <f1x/aasdk/USB/USBWrapper.hpp>
#include <f1x/aasdk/TCP/ITCPWrapper.hpp>
#include <f1x/aasdk/TCP/ITCPEndpoint.hpp>
#include <aasdk/USB/IUSBHub.hpp>
#include <aasdk/USB/IConnectedAccessoriesEnumerator.hpp>
#include <aasdk/USB/USBWrapper.hpp>
#include <aasdk/TCP/ITCPWrapper.hpp>
#include <aasdk/TCP/ITCPEndpoint.hpp>
#include <f1x/openauto/autoapp/Service/IAndroidAutoEntityEventHandler.hpp>
#include <f1x/openauto/autoapp/Service/IAndroidAutoEntityFactory.hpp>

Expand Down
4 changes: 2 additions & 2 deletions include/f1x/openauto/autoapp/Projection/IAudioInput.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#pragma once

#include <memory>
#include <f1x/aasdk/IO/Promise.hpp>
#include <f1x/aasdk/Common/Data.hpp>
#include <aasdk/IO/Promise.hpp>
#include <aasdk/Common/Data.hpp>

namespace f1x
{
Expand Down
4 changes: 2 additions & 2 deletions include/f1x/openauto/autoapp/Projection/IAudioOutput.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#pragma once

#include <memory>
#include <f1x/aasdk/Messenger/Timestamp.hpp>
#include <f1x/aasdk/Common/Data.hpp>
#include <aasdk/Messenger/Timestamp.hpp>
#include <aasdk/Common/Data.hpp>

namespace f1x
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/

#include <f1x/aasdk/IO/Promise.hpp>
#include <aasdk/IO/Promise.hpp>

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion include/f1x/openauto/autoapp/Projection/IInputDevice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#pragma once

#include <QRect>
#include <f1x/aasdk/IO/Promise.hpp>
#include <aasdk/IO/Promise.hpp>
#include <f1x/openauto/autoapp/Projection/InputEvent.hpp>

namespace f1x
Expand Down
2 changes: 1 addition & 1 deletion include/f1x/openauto/autoapp/Projection/IVideoOutput.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <QRect>
#include <aasdk_proto/VideoFPSEnum.pb.h>
#include <aasdk_proto/VideoResolutionEnum.pb.h>
#include <f1x/aasdk/Common/Data.hpp>
#include <aasdk/Common/Data.hpp>

namespace f1x
{
Expand Down
2 changes: 1 addition & 1 deletion include/f1x/openauto/autoapp/Projection/InputEvent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <aasdk_proto/ButtonCodeEnum.pb.h>
#include <aasdk_proto/TouchActionEnum.pb.h>
#include <f1x/aasdk/IO/Promise.hpp>
#include <aasdk/IO/Promise.hpp>

namespace f1x
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <QIODevice>
#include <mutex>
#include <boost/circular_buffer.hpp>
#include <f1x/aasdk/Common/Data.hpp>
#include <aasdk/Common/Data.hpp>

namespace f1x
{
Expand Down
12 changes: 7 additions & 5 deletions include/f1x/openauto/autoapp/Service/AndroidAutoEntity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#pragma once

#include <boost/asio.hpp>
#include <f1x/aasdk/Transport/ITransport.hpp>
#include <f1x/aasdk/Channel/Control/IControlServiceChannel.hpp>
#include <f1x/aasdk/Channel/Control/IControlServiceChannelEventHandler.hpp>
#include <f1x/aasdk/Channel/AV/VideoServiceChannel.hpp>
#include <aasdk/Transport/ITransport.hpp>
#include <aasdk/Channel/Control/IControlServiceChannel.hpp>
#include <aasdk/Channel/Control/IControlServiceChannelEventHandler.hpp>
#include <aasdk/Channel/AV/VideoServiceChannel.hpp>
#include <f1x/openauto/autoapp/Configuration/IConfiguration.hpp>
#include <f1x/openauto/autoapp/Service/IAndroidAutoEntity.hpp>
#include <f1x/openauto/autoapp/Service/IService.hpp>
Expand Down Expand Up @@ -60,8 +60,10 @@ class AndroidAutoEntity: public IAndroidAutoEntity, public aasdk::channel::contr
void onShutdownRequest(const aasdk::proto::messages::ShutdownRequest& request) override;
void onShutdownResponse(const aasdk::proto::messages::ShutdownResponse& response) override;
void onNavigationFocusRequest(const aasdk::proto::messages::NavigationFocusRequest& request) override;
void onPingResponse(const aasdk::proto::messages::PingResponse& response) override;
void onChannelError(const aasdk::error::Error& e) override;
void onPingRequest(const aasdk::proto::messages::PingRequest& request) override;
void onPingResponse(const aasdk::proto::messages::PingResponse& response) override;
void onVoiceSessionRequest(const aasdk::proto::messages::VoiceSessionRequest& request) override;

private:
using std::enable_shared_from_this<AndroidAutoEntity>::shared_from_this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#pragma once

#include <boost/asio.hpp>
#include <f1x/aasdk/Transport/ITransport.hpp>
#include <aasdk/Transport/ITransport.hpp>
#include <f1x/openauto/autoapp/Configuration/IConfiguration.hpp>
#include <f1x/openauto/autoapp/Service/IAndroidAutoEntityFactory.hpp>
#include <f1x/openauto/autoapp/Service/IServiceFactory.hpp>
Expand Down
2 changes: 1 addition & 1 deletion include/f1x/openauto/autoapp/Service/AudioInputService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include <f1x/aasdk/Channel/AV/AVInputServiceChannel.hpp>
#include <aasdk/Channel/AV/AVInputServiceChannel.hpp>
#include <f1x/openauto/autoapp/Service/IService.hpp>
#include <f1x/openauto/autoapp/Projection/IAudioInput.hpp>

Expand Down
4 changes: 2 additions & 2 deletions include/f1x/openauto/autoapp/Service/AudioService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#pragma once

#include <f1x/aasdk/Channel/AV/IAudioServiceChannel.hpp>
#include <f1x/aasdk/Channel/AV/IAudioServiceChannelEventHandler.hpp>
#include <aasdk/Channel/AV/IAudioServiceChannel.hpp>
#include <aasdk/Channel/AV/IAudioServiceChannelEventHandler.hpp>
#include <f1x/openauto/autoapp/Projection/IAudioOutput.hpp>
#include <f1x/openauto/autoapp/Service/IService.hpp>

Expand Down
2 changes: 1 addition & 1 deletion include/f1x/openauto/autoapp/Service/BluetoothService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include <f1x/aasdk/Channel/Bluetooth/BluetoothServiceChannel.hpp>
#include <aasdk/Channel/Bluetooth/BluetoothServiceChannel.hpp>
#include <f1x/openauto/autoapp/Projection/IBluetoothDevice.hpp>
#include <f1x/openauto/autoapp/Service/IService.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include <f1x/aasdk/Error/Error.hpp>
#include <aasdk/Error/Error.hpp>

namespace f1x
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#pragma once

#include <f1x/aasdk/TCP/ITCPEndpoint.hpp>
#include <f1x/aasdk/USB/IAOAPDevice.hpp>
#include <aasdk/TCP/ITCPEndpoint.hpp>
#include <aasdk/USB/IAOAPDevice.hpp>
#include <f1x/openauto/autoapp/Service/IAndroidAutoEntity.hpp>

namespace f1x
Expand Down
2 changes: 1 addition & 1 deletion include/f1x/openauto/autoapp/Service/IPinger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include <f1x/aasdk/IO/Promise.hpp>
#include <aasdk/IO/Promise.hpp>

namespace f1x
{
Expand Down
2 changes: 1 addition & 1 deletion include/f1x/openauto/autoapp/Service/IServiceFactory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include <f1x/aasdk/Messenger/IMessenger.hpp>
#include <aasdk/Messenger/IMessenger.hpp>
#include <f1x/openauto/autoapp/Service/IService.hpp>

namespace f1x
Expand Down
2 changes: 1 addition & 1 deletion include/f1x/openauto/autoapp/Service/InputService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#pragma once

#include <aasdk_proto/ButtonCodeEnum.pb.h>
#include <f1x/aasdk/Channel/Input/InputServiceChannel.hpp>
#include <aasdk/Channel/Input/InputServiceChannel.hpp>
#include <f1x/openauto/autoapp/Service/IService.hpp>
#include <f1x/openauto/autoapp/Projection/IInputDevice.hpp>
#include <f1x/openauto/autoapp/Projection/IInputDeviceEventHandler.hpp>
Expand Down
2 changes: 1 addition & 1 deletion include/f1x/openauto/autoapp/Service/MediaAudioService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include <f1x/aasdk/Messenger/IMessenger.hpp>
#include <aasdk/Messenger/IMessenger.hpp>
#include <f1x/openauto/autoapp/Service/AudioService.hpp>

namespace f1x
Expand Down
2 changes: 1 addition & 1 deletion include/f1x/openauto/autoapp/Service/SensorService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#pragma once

#include <gps.h>
#include <f1x/aasdk/Channel/Sensor/SensorServiceChannel.hpp>
#include <aasdk/Channel/Sensor/SensorServiceChannel.hpp>
#include <f1x/openauto/autoapp/Service/IService.hpp>

namespace f1x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include <f1x/aasdk/Messenger/IMessenger.hpp>
#include <aasdk/Messenger/IMessenger.hpp>
#include <f1x/openauto/autoapp/Service/AudioService.hpp>

namespace f1x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include <f1x/aasdk/Messenger/IMessenger.hpp>
#include <aasdk/Messenger/IMessenger.hpp>
#include <f1x/openauto/autoapp/Service/AudioService.hpp>

namespace f1x
Expand Down
4 changes: 2 additions & 2 deletions include/f1x/openauto/autoapp/Service/VideoService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#pragma once

#include <memory>
#include <f1x/aasdk/Channel/AV/VideoServiceChannel.hpp>
#include <f1x/aasdk/Channel/AV/IVideoServiceChannelEventHandler.hpp>
#include <aasdk/Channel/AV/VideoServiceChannel.hpp>
#include <aasdk/Channel/AV/IVideoServiceChannelEventHandler.hpp>
#include <f1x/openauto/autoapp/Projection/IVideoOutput.hpp>
#include <f1x/openauto/autoapp/Service/IService.hpp>

Expand Down
2 changes: 1 addition & 1 deletion include/f1x/openauto/autoapp/Service/WifiService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <f1x/openauto/autoapp/Configuration/IConfiguration.hpp>
#include <f1x/openauto/autoapp/Service/IService.hpp>
#include <boost/asio/io_service.hpp>
#include <f1x/aasdk/Messenger/IMessenger.hpp>
#include <aasdk/Messenger/IMessenger.hpp>

namespace f1x
{
Expand Down
4 changes: 2 additions & 2 deletions include/f1x/openauto/autoapp/UI/ConnectDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include <QDialog>
#include <QStringListModel>
#include <QKeyEvent>
#include <f1x/aasdk/TCP/ITCPEndpoint.hpp>
#include <f1x/aasdk/TCP/ITCPWrapper.hpp>
#include <aasdk/TCP/ITCPEndpoint.hpp>
#include <aasdk/TCP/ITCPWrapper.hpp>
#include <f1x/openauto/autoapp/Configuration/IRecentAddressesList.hpp>

namespace Ui {
Expand Down
2 changes: 1 addition & 1 deletion include/f1x/openauto/btservice/AndroidBluetoothServer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <QBluetoothServer>
#include <f1x/openauto/btservice/IAndroidBluetoothServer.hpp>
#include <f1x/openauto/autoapp/Configuration/IConfiguration.hpp>
#include <f1x/aasdk/Messenger/Message.hpp>
#include <aasdk/Messenger/Message.hpp>

namespace f1x
{
Expand Down
4 changes: 2 additions & 2 deletions src/autoapp/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/

#include <thread>
#include <f1x/aasdk/USB/AOAPDevice.hpp>
#include <f1x/aasdk/TCP/TCPEndpoint.hpp>
#include <aasdk/USB/AOAPDevice.hpp>
#include <aasdk/TCP/TCPEndpoint.hpp>
#include <f1x/openauto/autoapp/App.hpp>
#include <f1x/openauto/Common/Log.hpp>

Expand Down
16 changes: 15 additions & 1 deletion src/autoapp/Service/AndroidAutoEntity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/

#include <f1x/aasdk/Channel/Control/ControlServiceChannel.hpp>
#include <aasdk/Channel/Control/ControlServiceChannel.hpp>
#include <f1x/openauto/autoapp/Service/AndroidAutoEntity.hpp>
#include <f1x/openauto/Common/Log.hpp>

Expand Down Expand Up @@ -238,6 +238,20 @@ void AndroidAutoEntity::onShutdownRequest(const aasdk::proto::messages::Shutdown
controlServiceChannel_->sendShutdownResponse(response, std::move(promise));
}

void AndroidAutoEntity::onPingRequest(const aasdk::proto::messages::PingRequest& request)
{
OPENAUTO_LOG(info) << "[AndroidAutoEntity] ping request ";

auto promise = aasdk::channel::SendPromise::defer(strand_);
promise->then([]() {}, std::bind(&AndroidAutoEntity::onChannelError, this->shared_from_this(), std::placeholders::_1));
controlServiceChannel_->sendPingRequest(request, std::move(promise));
}

void AndroidAutoEntity::onVoiceSessionRequest(const aasdk::proto::messages::VoiceSessionRequest& request)
{
OPENAUTO_LOG(error) << "[AndroidAutoEntity] voice session request not implemented";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note - I couldn't find anything that references "voice session" only video session and has more then just start and stop

}

void AndroidAutoEntity::onShutdownResponse(const aasdk::proto::messages::ShutdownResponse&)
{
OPENAUTO_LOG(info) << "[AndroidAutoEntity] Shutdown response ";
Expand Down
16 changes: 8 additions & 8 deletions src/autoapp/Service/AndroidAutoEntityFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/

#include <f1x/aasdk/USB/AOAPDevice.hpp>
#include <f1x/aasdk/Transport/SSLWrapper.hpp>
#include <f1x/aasdk/Transport/USBTransport.hpp>
#include <f1x/aasdk/Transport/TCPTransport.hpp>
#include <f1x/aasdk/Messenger/Cryptor.hpp>
#include <f1x/aasdk/Messenger/MessageInStream.hpp>
#include <f1x/aasdk/Messenger/MessageOutStream.hpp>
#include <f1x/aasdk/Messenger/Messenger.hpp>
#include <aasdk/USB/AOAPDevice.hpp>
#include <aasdk/Transport/SSLWrapper.hpp>
#include <aasdk/Transport/USBTransport.hpp>
#include <aasdk/Transport/TCPTransport.hpp>
#include <aasdk/Messenger/Cryptor.hpp>
#include <aasdk/Messenger/MessageInStream.hpp>
#include <aasdk/Messenger/MessageOutStream.hpp>
#include <aasdk/Messenger/Messenger.hpp>
#include <f1x/openauto/autoapp/Service/AndroidAutoEntityFactory.hpp>
#include <f1x/openauto/autoapp/Service/AndroidAutoEntity.hpp>
#include <f1x/openauto/autoapp/Service/Pinger.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/autoapp/Service/MediaAudioService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/

#include <f1x/aasdk/Channel/AV/MediaAudioServiceChannel.hpp>
#include <aasdk/Channel/AV/MediaAudioServiceChannel.hpp>
#include <f1x/openauto/autoapp/Service/MediaAudioService.hpp>

namespace f1x
Expand Down
5 changes: 2 additions & 3 deletions src/autoapp/Service/SensorService.cpp
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems you have tried to use a different libgps version than what was previously used. is this intentional?
You seem to have resolved the resulting problems but someone really should write down the versions used for compilation (or at least the distro version!)
From what I can tell the original working version is libgps-dev=3.17-5

Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void SensorService::sendGPSLocationData()
auto * locInd = indication.add_gps_location();

// epoch seconds
locInd->set_timestamp(this->gpsData_.fix.time * 1e3);
locInd->set_timestamp(this->gpsData_.fix.time.tv_sec);
// degrees
locInd->set_latitude(this->gpsData_.fix.latitude * 1e7);
locInd->set_longitude(this->gpsData_.fix.longitude * 1e7);
Expand Down Expand Up @@ -229,8 +229,7 @@ void SensorService::sensorPolling()

if ((this->gpsEnabled_) &&
(gps_waiting(&this->gpsData_, 0)) &&
(gps_read(&this->gpsData_) > 0) &&
(this->gpsData_.status != STATUS_NO_FIX) &&
(gps_read(&this->gpsData_, nullptr, 0) > 0) &&
(this->gpsData_.fix.mode == MODE_2D || this->gpsData_.fix.mode == MODE_3D) &&
(this->gpsData_.set & TIME_SET) &&
(this->gpsData_.set & LATLON_SET))
Expand Down
6 changes: 3 additions & 3 deletions src/autoapp/Service/ServiceFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

#include <QApplication>
#include <QScreen>
#include <f1x/aasdk/Channel/AV/MediaAudioServiceChannel.hpp>
#include <f1x/aasdk/Channel/AV/SystemAudioServiceChannel.hpp>
#include <f1x/aasdk/Channel/AV/SpeechAudioServiceChannel.hpp>
#include <aasdk/Channel/AV/MediaAudioServiceChannel.hpp>
#include <aasdk/Channel/AV/SystemAudioServiceChannel.hpp>
#include <aasdk/Channel/AV/SpeechAudioServiceChannel.hpp>
#include <f1x/openauto/autoapp/Service/ServiceFactory.hpp>
#include <f1x/openauto/autoapp/Service/VideoService.hpp>
#include <f1x/openauto/autoapp/Service/MediaAudioService.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/autoapp/Service/SpeechAudioService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/

#include <f1x/aasdk/Channel/AV/SpeechAudioServiceChannel.hpp>
#include <aasdk/Channel/AV/SpeechAudioServiceChannel.hpp>
#include <f1x/openauto/autoapp/Service/SpeechAudioService.hpp>

namespace f1x
Expand Down
2 changes: 1 addition & 1 deletion src/autoapp/Service/SystemAudioService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/

#include <f1x/aasdk/Channel/AV/SystemAudioServiceChannel.hpp>
#include <aasdk/Channel/AV/SystemAudioServiceChannel.hpp>
#include <f1x/openauto/autoapp/Service/SystemAudioService.hpp>

namespace f1x
Expand Down
Loading