You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Updated branches (2024-03-24):** the default branch was renamed from master into main. The develop branch hasn't been used anymore, so it is deleted. This better represents how branches are used in MicroOcpp: active development takes place on main (plus the feature and fixing branches) and the releases are stable versions of this library. To get a release version, checkout a tag, e.g. *v1.0.3*, or download it from GitHub / PlatformIO.
In case you use PlatformIO, you can copy all dependencies from `platformio.ini` into your own configuration file. Alternatively, you can install the full library with dependencies by adding `matth-x/MicroOcpp@1.0.3` in the PIO library manager.
72
+
In case you use PlatformIO, you can copy all dependencies from `platformio.ini` into your own configuration file. Alternatively, you can install the full library with dependencies by adding `matth-x/MicroOcpp@1.1.0` in the PIO library manager.
Copy file name to clipboardExpand all lines: docs/migration.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,25 @@
1
-
# Migrating to v1.0
1
+
# Migrating to v1.1
2
+
3
+
As a new minor version, all features should work the same as in v1.0 and existing integrations are mostly backwards compatible. However, some fixes / cleanup steps in MicroOcpp require syntactic changes or special consideration when upgrading from v1.0 to v1.1. The known pitfalls are as follows:
4
+
5
+
- The default branch has been renamed from `master` into `main`
6
+
- Need to include extra headers: the transitive includes have been cleaned a bit. Probably it's necessary to add more includes next to `#include <MicroOcpp.h>`. E.g.<br/>`#include <MicroOcpp/Model/Diagnostics/DiagnosticsService.h>`<br/>`#include <MicroOcpp/Model/FirmwareManagement/FirmwareService.h>`
7
+
-`ocppPermitsCharge()` does not consider failures reported by the charger anymore. Before v1.1 it was possible to report failures to MicroOcpp using ErrorCodeInputs and then to rely on `ocppPermitsCharge()` becoming false when a failure occurs. For backwards compatibility, complement any occurence to `ocppPermitsCharge() && !isFaulted()`
8
+
-`setEnergyMeterInput` changed the expected return type of the callback function from `float` to `int` (see [#301](https://github.com/matth-x/MicroOcpp/pull/301))
9
+
- The return type of the UnlockConnector handler also changed from `PollResult<bool>` to enum `UnlockConnectorResult` (see [#271](https://github.com/matth-x/MicroOcpp/pull/271))
10
+
11
+
If upgrading MicroOcppMongoose at the same time, then the following changes are very important to consider:
12
+
13
+
- Certificates are no longer copied into heap memory, but the MO-Mongoose class takes the passed certificate pointer as a zero-copy parameter. The string behind the passed pointer must outlive the MO-Mongoose class (see [#10](https://github.com/matth-x/MicroOcppMongoose/pull/10))
14
+
- WebSocket authorization keys are no longer stored as c-strings, but as `unsigned char` buffers. For backwards compatibility, a null-byte is still appended and the buffer can be accessed as c-string, but this should be tested in existing deployments. Furtermore, MicroOcpp only accepts hex-encoded keys coming via ChangeConfiguration which is mandated by the standard. This also may break existing deployments (see [#4](https://github.com/matth-x/MicroOcppMongoose/pull/4)).
15
+
16
+
If accessing the MicroOcpp modules directly (i.e. not over `MicroOcpp.h` or `MicroOcpp_c.h`) then there are likely some more modifications to be done. See the history of pull requests where each change to the code is documented. However, if the existing integration compiles under the new MO version, then there shouldn't be too many unexpected incompatibilities.
17
+
18
+
## Migrating to v1.0
2
19
3
20
The API has been continously improved to best suit the common use cases for MicroOcpp. Moreover, the project has been given a new name to prevent confusion with the relation to the Arduino platform and to reflect the project goals properly. With the new project name, the API has been frozen for the v1.0 release.
4
21
5
-
## Adopting the new project name in existing projects
22
+
###Adopting the new project name in existing projects
6
23
7
24
Find and replace the keywords in the following.
8
25
@@ -30,7 +47,7 @@ If using the C-facade, change this as the final step:
30
47
31
48
-`ao_` to `ocpp_`
32
49
33
-
## Further API changes to consider
50
+
###Further API changes to consider
34
51
35
52
In addition to the new project name, the API has also been reworked for more consistency. After renaming the existing project as described above, also take a look at the [changelogs](https://github.com/matth-x/MicroOcpp/blob/1.0.x/CHANGELOG.md) (see Section Changed for v1.0.0).
0 commit comments