mirror of https://github.com/arendst/Tasmota.git
Managing a Fork
parent
1a2199cfee
commit
de65f7d18f
|
@ -18,10 +18,22 @@ This wiki page is an attempt to document the Tasmota sensor API for sensor drive
|
|||
* While developing you might want to enable additional debugging provided by file ``xdrv_95_debug.ino`` using `#define USE_DEBUG_DRIVER` which provides some commands for managing configuration settings and CPU timing. In addition you can enable define `PROFILE_XSNS_SENSOR_EVERY_SECOND` to profile your drivers duration.
|
||||
* Do not assume others will know immediately how to use your addition and know that you will need to write a Wiki for it in the end.
|
||||
|
||||
# Managing a Forked Branch
|
||||
- git checkout Tasmota development branch
|
||||
- git pull upstream development
|
||||
Now the local branch is synced to the Tasmota repo
|
||||
- git checkout -b <new_branch>
|
||||
- git push --set-upstream origin <new_branch>
|
||||
- Merge the edits but be sure to remove the history of your local commits
|
||||
- git merge --squash <your_initial_branch>
|
||||
- git commit -m "Message"
|
||||
|
||||
Now you have a clean single commit from which you can create the PR on the Tasmota Github.
|
||||
|
||||
# Directory/file structure
|
||||
Sensor libraries are located in the `lib/` directory. Sensor drivers are located in the `sonoff/` directory. The filename of the sensor driver is `xsns_<driver_ID>_<driver_name>.ino`, e.g. `xsns_05_ds18b20.ino` where `<driver_ID>` is a _unique_ number between 01 and 90 and `<driver_name>` is a human-readable name of the driver.
|
||||
|
||||
Using generic libraries from external sources for sensors should be avoided as far as possible as they usually include code for other platforms and are not always written in an optimised way.
|
||||
Using generic libraries from external sources for sensors should be avoided as far as possible as they usually include code for other platforms and are not always written in an optimized way.
|
||||
|
||||
# API structure
|
||||
## Pre-processor directives
|
||||
|
|
Loading…
Reference in New Issue