-
Notifications
You must be signed in to change notification settings - Fork 13
Training ‐ 3. Driver Development: Creating Driver Framework and Adding to Build
Michael Elmore edited this page Nov 17, 2023
·
3 revisions
- Java Programming Language: Entry Level Experience
- Training 2 complete
- Right-click and copy sensorhub-driver-template

- Right-click the sensors folder and paste

Assign a new name, in this case, sensorhub-driver-simulation


- Navigate to the driver package and right-click on the package
- Select Rename

- Provide a new name; in this case, simulated
- Select Refactor


Open sensorhub-driver-simulation/build.gradle

Edit description: This field contains the name that will be assigned to your driver and is visible in OpenSensorHub
Simulated Sensor Driver

Edit ext.details: This field contains the description assigned to your driver and is visible in OpenSensorHub
Driver Simulation - OpenSensorHub Driver Development Labs

Edit the Details within the ext.pom block
id – nickaname, e-mail, etc
name – self-explanatory
organization – company name
organizationUrl – self-explanatory

Updating and Building
- Open project wide build.gradle
- Dependencies block shown with some examples commented out
- Add dependency for driver and comment out the template
// implementation project(':sensorhub-driver-template')
implementation project(':sensorhub-driver-simulation')

- Open settings.gradle
- Uncomment FileTree Builder if it is not already

- Add statement to ignore project folders with "template" in name
if (!projectFolder.name.contains("template")) {
- Refresh Gradle
