-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Application specific HAL libraries created.
- Loading branch information
Showing
19 changed files
with
2,064 additions
and
30 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "HALConvoyLeaderSim", | ||
"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": "HALInterfaces" | ||
}, { | ||
"name": "HALSim" | ||
}, { | ||
"name": "Webots" | ||
}], | ||
"frameworks": "*", | ||
"platforms": "*" | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "HALConvoyLeaderTarget", | ||
"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": "HALInterfaces" | ||
}, { | ||
"name": "HALTarget" | ||
}, { | ||
"owner": "pololu", | ||
"name": "Zumo32U4", | ||
"version": "^2.0.1" | ||
}], | ||
"frameworks": "arduino", | ||
"platforms": "*" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
/* MIT License | ||
* | ||
* Copyright (c) 2019 - 2023 Andreas Merkle <web@blue-andi.de> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
/******************************************************************************* | ||
DESCRIPTION | ||
*******************************************************************************/ | ||
/** | ||
* @brief The simulation robot board realization. | ||
* @author Andreas Merkle <web@blue-andi.de> | ||
*/ | ||
|
||
/****************************************************************************** | ||
* Includes | ||
*****************************************************************************/ | ||
#include <Board.h> | ||
|
||
/****************************************************************************** | ||
* Compiler Switches | ||
*****************************************************************************/ | ||
|
||
/****************************************************************************** | ||
* Macros | ||
*****************************************************************************/ | ||
|
||
/****************************************************************************** | ||
* Types and classes | ||
*****************************************************************************/ | ||
|
||
/****************************************************************************** | ||
* Prototypes | ||
*****************************************************************************/ | ||
|
||
/****************************************************************************** | ||
* Local Variables | ||
*****************************************************************************/ | ||
|
||
/* Name of the speaker in the robot simulation. */ | ||
const char* Board::SPEAKER_NAME = "robot_speaker"; | ||
|
||
/* Name of the display in the robot simulation. */ | ||
const char* Board::DISPLAY_NAME = "robot_display"; | ||
|
||
/* Name of the left motor in the robot simulation. */ | ||
const char* Board::LEFT_MOTOR_NAME = "motor_left"; | ||
|
||
/* Name of the right motor in the robot simulation. */ | ||
const char* Board::RIGHT_MOTOR_NAME = "motor_right"; | ||
|
||
/* Name of the infrared emitter 0 in the robot simulation. */ | ||
const char* Board::EMITTER_0_NAME = "emitter_l"; | ||
|
||
/* Name of the infrared emitter 1 in the robot simulation. */ | ||
const char* Board::EMITTER_1_NAME = "emitter_lm"; | ||
|
||
/* Name of the infrared emitter 2 in the robot simulation. */ | ||
const char* Board::EMITTER_2_NAME = "emitter_m"; | ||
|
||
/* Name of the infrared emitter 3 in the robot simulation. */ | ||
const char* Board::EMITTER_3_NAME = "emitter_rm"; | ||
|
||
/* Name of the infrared emitter 4 in the robot simulation. */ | ||
const char* Board::EMITTER_4_NAME = "emitter_r"; | ||
|
||
/** Name of the position sensor of the left motor in the robot simulation. */ | ||
const char* Board::POS_SENSOR_LEFT_NAME = "position_sensor_left"; | ||
|
||
/** Name of the position sensor of the right motor in the robot simulation. */ | ||
const char* Board::POS_SENSOR_RIGHT_NAME = "position_sensor_right"; | ||
|
||
/* Name of the light sensor 0 in the robot simulation. */ | ||
const char* Board::LIGHT_SENSOR_0_NAME = "lightsensor_l"; | ||
|
||
/* Name of the light sensor 1 in the robot simulation. */ | ||
const char* Board::LIGHT_SENSOR_1_NAME = "lightsensor_lm"; | ||
|
||
/* Name of the light sensor 2 in the robot simulation. */ | ||
const char* Board::LIGHT_SENSOR_2_NAME = "lightsensor_m"; | ||
|
||
/* Name of the light sensor 3 in the robot simulation. */ | ||
const char* Board::LIGHT_SENSOR_3_NAME = "lightsensor_rm"; | ||
|
||
/* Name of the light sensor 4 in the robot simulation. */ | ||
const char* Board::LIGHT_SENSOR_4_NAME = "lightsensor_r"; | ||
|
||
/* Name of the red LED in the robot simulation. */ | ||
const char* Board::LED_RED_NAME = "led_red"; | ||
|
||
/* Name of the yellow LED in the robot simulation. */ | ||
const char* Board::LED_YELLOW_NAME = "led_yellow"; | ||
|
||
/* Name of the green LED in the robot simulation. */ | ||
const char* Board::LED_GREEN_NAME = "led_green"; | ||
|
||
/* Name of the front left proximity sensor in the robot simulation. */ | ||
const char* Board::PROXIMITY_SENSOR_FRONT_LEFT_NAME = "proxim_sensor_fl"; | ||
|
||
/* Name of the front right proximity sensor in the robot simulation. */ | ||
const char* Board::PROXIMITY_SENSOR_FRONT_RIGHT_NAME = "proxim_sensor_fr"; | ||
|
||
/****************************************************************************** | ||
* Protected Methods | ||
*****************************************************************************/ | ||
|
||
/****************************************************************************** | ||
* Private Methods | ||
*****************************************************************************/ | ||
|
||
/****************************************************************************** | ||
* External Functions | ||
*****************************************************************************/ | ||
|
||
void Board::init() | ||
{ | ||
m_encoders.init(); | ||
m_keyboard.init(); | ||
m_lineSensors.init(); | ||
m_motors.init(); | ||
m_proximitySensors.initFrontSensor(); | ||
} | ||
|
||
/****************************************************************************** | ||
* Local Functions | ||
*****************************************************************************/ |
Oops, something went wrong.