Skip to content
Merged
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
95 changes: 51 additions & 44 deletions doc/architecture/uml/LogicalView/HALTarget.plantuml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,41 @@

Title Target HAL Class Diagram

package "HALTarget" as hal {
package "Interfaces" as interfaces {
interface "IButton" as iButton {
+ {abstract} isShortPressed() : bool
+ {abstract} isLongPressed() : bool
+ {abstract} waitForRelease() : void
}

interface "IBattery" as iBattery {
+ {abstract} getBatteryVoltage() : uint32_t
+ {abstract} getChargeLevel() : uint8_t
}

interface "IRobot" as iRobot {
+ {abstract} init() : bool
+ {abstract} process() : bool
+ {abstract} getStream() : Stream
+ {abstract} reset() : void
}

interface "INetwork" as iNetwork {
+ {abstract} init() : bool
+ {abstract} process() : bool
+ {abstract} getStream() : Stream
}

interface "ILed" as iLed {
+ {abstract} enable(enableIt : bool) : void
}

interface "IGps" as iGps {
+ {abstract} getGpsData() : GpsData
}
}

package "HALTargetV1" as halV1 {
class Board << namespace >> {
+ getButton() : IButton&
+ getBattery() : IBattery&
Expand All @@ -15,49 +48,16 @@ package "HALTarget" as hal {
+ getGps() : nullptr
}

package "Interfaces" as interfaces {
interface "IButton" as iButton {
+ {abstract} isShortPressed() : bool
+ {abstract} isLongPressed() : bool
+ {abstract} waitForRelease() : void
}

interface "IBattery" as iBattery {
+ {abstract} getBatteryVoltage() : uint32_t
+ {abstract} getChargeLevel() : uint8_t
}

interface "IRobot" as iRobot {
+ {abstract} init() : bool
+ {abstract} process() : bool
+ {abstract} getStream() : Stream
+ {abstract} reset() : void
}

interface "INetwork" as iNetwork {
+ {abstract} init() : bool
+ {abstract} process() : bool
+ {abstract} getStream() : Stream
}

interface "ILed" as iLed {
+ {abstract} enable(enableIt : bool) : void
}

interface "IGps" as iGps {
+ {abstract} getGpsData() : GpsData
}
}
class "USB-Host" as Robot
}

package "Target" as target {
class "Button" as Button
class "Battery" as Battery
class "USB-Host" as Robot
class "MQTT" as Network
class "LedRed" as LedRed
class "LedGreen" as LedGreen
class "LedBlue" as LedBlue
}
package "HALTargetCommon" as halCommon {
class "Button" as Button
class "Battery" as Battery
class "MQTT" as Network
class "LedRed" as LedRed
class "LedGreen" as LedGreen
class "LedBlue" as LedBlue

iButton <|... Button : <<realize>>
iBattery <|... Battery : <<realize>>
Expand All @@ -66,7 +66,6 @@ package "HALTarget" as hal {
iLed <|... LedRed : <<realize>>
iLed <|... LedGreen : <<realize>>
iLed <|... LedBlue : <<realize>>

}

package "Libraries" as libs
Expand All @@ -80,6 +79,14 @@ package "Libraries" as libs
}
}

Board *--> Button
Board *--> Battery
Board *--> Robot
Board *--> Network
Board *--> LedRed
Board *--> LedGreen
Board *--> LedBlue

Robot *--> RobotLib
Network *--> NetworkLib

Expand Down
4 changes: 3 additions & 1 deletion doc/configuration/uml/configuration.plantuml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ component "ConvoyFollower" <<lib>> as convoyFollower
component "target:esp32" <<pio>> as targetEsp32
component "target:Sim" <<pio>> as targetSim

component "HALTarget" <<lib>> as halTarget
component "HALTargetCommon" <<lib>> as halTarget
component "HALTargetV1" <<lib>> as halTargetV1
component "HALSim" <<lib>> as halSim

envConvoyLeader ..> appConvoyLeader
Expand All @@ -36,6 +37,7 @@ appConvoyLeader ..> convoyLeader
appConvoyFollower ..> convoyFollower

targetEsp32 ..> halTarget
targetEsp32 ..> halTargetV1
targetSim ..> halSim

@enduml
3 changes: 2 additions & 1 deletion doc/doxygen/ConvoyFollowerTargetDoxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,8 @@ WARN_LOGFILE = doxygen_warnings.txt

INPUT = mainpage.dox \
../../src \
../../lib/HALTarget \
../../lib/HALTargetCommon \
../../lib/HALTargetV1 \
../../lib/HALInterfaces \
../../lib/APPConvoyFollower \
../../lib/Service \
Expand Down
3 changes: 2 additions & 1 deletion doc/doxygen/ConvoyLeaderTargetDoxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,8 @@ INPUT = mainpage.dox \
../../src \
../../lib/APPConvoyLeader \
../../lib/HALInterfaces \
../../lib/HALTarget \
../../lib/HALTargetCommon \
../../lib/HALTargetV1 \
../../lib/PlatoonService \
../../lib/Service \
../../lib/Utilities
Expand Down
3 changes: 2 additions & 1 deletion doc/doxygen/LineFollowerTargetDoxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,8 @@ WARN_LOGFILE = doxygen_warnings.txt

INPUT = mainpage.dox \
../../src \
../../lib/HALTarget \
../../lib/HALTargetCommon \
../../lib/HALTargetV1 \
../../lib/HALInterfaces \
../../lib/APPLineFollower \
../../lib/Service \
Expand Down
3 changes: 2 additions & 1 deletion doc/doxygen/RemoteControlTargetDoxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,8 @@ WARN_LOGFILE = doxygen_warnings.txt

INPUT = mainpage.dox \
../../src \
../../lib/HALTarget \
../../lib/HALTargetCommon \
../../lib/HALTargetV1 \
../../lib/HALInterfaces \
../../lib/APPRemoteControl \
../../lib/Service \
Expand Down
3 changes: 2 additions & 1 deletion doc/doxygen/SensorFusionTargetDoxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,8 @@ WARN_LOGFILE = doxygen_warnings.txt

INPUT = mainpage.dox \
../../src \
../../lib/HALTarget \
../../lib/HALTargetCommon \
../../lib/HALTargetV1 \
../../lib/HALInterfaces \
../../lib/APPSensorFusion \
../../lib/Service \
Expand Down
3 changes: 2 additions & 1 deletion doc/doxygen/TurtleTargetDoxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,8 @@ INPUT = mainpage.dox \
../../src \
../../lib/APPTurtle \
../../lib/HALInterfaces \
../../lib/HALTarget \
../../lib/HALTargetCommon \
../../lib/HALTargetV1 \
../../lib/Service \
../../lib/Utilities

Expand Down
17 changes: 17 additions & 0 deletions lib/HALTargetCommon/library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "HALTargetCommon",
"version": "0.1.0",
"description": "...",
"authors": [{
"name": "Andreas Merkle",
"email": "web@blue-andi.de",
"url": "https://github.com/BlueAndi",
"maintainer": true
}],
"license": "MIT",
"dependencies": [{
"name": "Os"
}],
"frameworks": "arduino",
"platforms": "*"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* Includes
*****************************************************************************/
#include "IRobot.h"
#include "USBHost.h"
#include "USBHostDriver.h"
#include <SimpleTimer.hpp>

/******************************************************************************
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "HALTarget",
"name": "HALTargetV1",
"version": "0.1.0",
"description": "...",
"authors": [{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/******************************************************************************
* Includes
*****************************************************************************/
#include "USBHost.h"
#include "USBHostDriver.h"
#include <Logging.h>

/******************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
* @{
*/

#ifndef USBHOST_H
#define USBHOST_H
#ifndef USBHOSTDRIVER_H
#define USBHOSTDRIVER_H

/******************************************************************************
* Compile Switches
Expand Down Expand Up @@ -243,5 +243,5 @@ class USBHost : public Stream
* Functions
*****************************************************************************/

#endif /* USBHOST_H */
#endif /* USBHOSTDRIVER_H */
/** @} */
6 changes: 4 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ build_flags =
-D CONFIG_FILE_PATH="\"/config/config.json\""
lib_deps =
HALInterfaces
HALTarget
HALTargetV1
HALTargetCommon
https://github.com/NewTec-GmbH/USB_Host_Shield_2.0.git#3_Endpoints_ACM
knolleary/PubSubClient @ ~2.8
SPI
Expand Down Expand Up @@ -114,7 +115,8 @@ lib_deps =
Webots
MainNative
lib_ignore =
HALTarget
HALTargetCommon
HALTargetV1
HALTest
MainTestNative
extra_scripts =
Expand Down