From d4168002f948d53a2a77267fb38d23858d2d9db3 Mon Sep 17 00:00:00 2001 From: BlueAndi Date: Sun, 3 Aug 2025 11:52:32 +0200 Subject: [PATCH 1/5] std::string is not allowed to be initialized by nullptr, this use case is catched now. --- src/WString.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WString.h b/src/WString.h index 6253b76..61da357 100644 --- a/src/WString.h +++ b/src/WString.h @@ -96,7 +96,7 @@ class String * * @param[in] other String to copy */ - String(const char* other) : m_stdStr(other) + String(const char* other) : m_stdStr((nullptr == other) ? "" : other) { } @@ -115,7 +115,7 @@ class String * @param[in] other String to copy * @param[in] length Number of characters to copy */ - String(const char* other, unsigned int length) : m_stdStr(other, length) + String(const char* other, unsigned int length) : m_stdStr((nullptr == other) ? "" : std::string(other, length)) { } From 6bfedfd98e13639d543fb2dc668cfbde9e837fe9 Mon Sep 17 00:00:00 2001 From: BlueAndi Date: Sun, 3 Aug 2025 11:52:45 +0200 Subject: [PATCH 2/5] Version bump to v0.2.2 --- doc/doxygen/Doxyfile | 2 +- examples/example/platformio.ini | 2 +- library.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index 65c7254..fcd3ee0 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = "ArduinoNative" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = v0.1.0 +PROJECT_NUMBER = v0.2.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/examples/example/platformio.ini b/examples/example/platformio.ini index 3207351..11755ec 100644 --- a/examples/example/platformio.ini +++ b/examples/example/platformio.ini @@ -19,4 +19,4 @@ build_flags = -D _USE_MATH_DEFINES lib_deps = MainNative - BlueAndi/ArduinoNative @ ~0.1.1 + BlueAndi/ArduinoNative @ ~0.2.2 diff --git a/library.json b/library.json index e842ca8..8819f25 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "ArduinoNative", - "version": "0.2.1", + "version": "0.2.2", "description": "Arduino for the native environment. It doesn't support every interface, just some of them!", "authors": [{ "name": "Andreas Merkle", From 8e1f07ace991a1c9d1bbdcf63a84bef77b85d883 Mon Sep 17 00:00:00 2001 From: BlueAndi Date: Sun, 3 Aug 2025 11:54:16 +0200 Subject: [PATCH 3/5] Copyright year updated to 2025 --- LICENSE | 2 +- examples/example/LICENSE | 2 +- examples/example/lib/MainNative/src/main.cpp | 2 +- examples/example/src/main.cpp | 2 +- src/Arduino.cpp | 2 +- src/Arduino.h | 2 +- src/Print.h | 2 +- src/Serial.cpp | 2 +- src/Serial.h | 2 +- src/Stream.h | 2 +- src/Terminal.cpp | 2 +- src/Terminal.h | 2 +- src/WString.h | 2 +- test/test_Wstring/test_WString.cpp | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/LICENSE b/LICENSE index b3a1e7e..f48d982 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Andreas Merkle +Copyright (c) 2023 - 2025 Andreas Merkle Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/examples/example/LICENSE b/examples/example/LICENSE index 6b991e9..7bae39a 100644 --- a/examples/example/LICENSE +++ b/examples/example/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 - 2024 Andreas Merkle +Copyright (c) 2023 - 2025 Andreas Merkle Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/examples/example/lib/MainNative/src/main.cpp b/examples/example/lib/MainNative/src/main.cpp index d734861..6f9e58d 100644 --- a/examples/example/lib/MainNative/src/main.cpp +++ b/examples/example/lib/MainNative/src/main.cpp @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2023 - 2024 Andreas Merkle + * Copyright (c) 2023 - 2025 Andreas Merkle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/examples/example/src/main.cpp b/examples/example/src/main.cpp index 99073b2..f3cae5f 100644 --- a/examples/example/src/main.cpp +++ b/examples/example/src/main.cpp @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2023 - 2024 Andreas Merkle + * Copyright (c) 2023 - 2025 Andreas Merkle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/Arduino.cpp b/src/Arduino.cpp index 9e151b6..b18b15f 100644 --- a/src/Arduino.cpp +++ b/src/Arduino.cpp @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2023 - 2024 Andreas Merkle + * Copyright (c) 2023 - 2025 Andreas Merkle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/Arduino.h b/src/Arduino.h index 84f2287..8cd2188 100644 --- a/src/Arduino.h +++ b/src/Arduino.h @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2023 - 2024 Andreas Merkle + * Copyright (c) 2023 - 2025 Andreas Merkle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/Print.h b/src/Print.h index 46cc995..696f4f1 100644 --- a/src/Print.h +++ b/src/Print.h @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2023 - 2024 Andreas Merkle + * Copyright (c) 2023 - 2025 Andreas Merkle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/Serial.cpp b/src/Serial.cpp index b1a2176..bc689ae 100644 --- a/src/Serial.cpp +++ b/src/Serial.cpp @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2023 - 2024 Andreas Merkle + * Copyright (c) 2023 - 2025 Andreas Merkle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/Serial.h b/src/Serial.h index 45ca8f1..423aac0 100644 --- a/src/Serial.h +++ b/src/Serial.h @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2023 - 2024 Andreas Merkle + * Copyright (c) 2023 - 2025 Andreas Merkle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/Stream.h b/src/Stream.h index 204d83b..1c5b727 100644 --- a/src/Stream.h +++ b/src/Stream.h @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2023 - 2024 Andreas Merkle + * Copyright (c) 2023 - 2025 Andreas Merkle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/Terminal.cpp b/src/Terminal.cpp index 205475d..792316e 100644 --- a/src/Terminal.cpp +++ b/src/Terminal.cpp @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2023 - 2024 Andreas Merkle + * Copyright (c) 2023 - 2025 Andreas Merkle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/Terminal.h b/src/Terminal.h index a55cf13..13e7c8d 100644 --- a/src/Terminal.h +++ b/src/Terminal.h @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2023 - 2024 Andreas Merkle + * Copyright (c) 2023 - 2025 Andreas Merkle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/WString.h b/src/WString.h index 61da357..1183977 100644 --- a/src/WString.h +++ b/src/WString.h @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2023 - 2024 Andreas Merkle + * Copyright (c) 2023 - 2025 Andreas Merkle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/test/test_Wstring/test_WString.cpp b/test/test_Wstring/test_WString.cpp index 811a53a..a6ce123 100644 --- a/test/test_Wstring/test_WString.cpp +++ b/test/test_Wstring/test_WString.cpp @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2023 - 2024 Andreas Merkle + * Copyright (c) 2023 - 2025 Andreas Merkle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal From 3cf2b0fda9610d9955da3af3cd963754ecc8e86a Mon Sep 17 00:00:00 2001 From: BlueAndi Date: Sun, 3 Aug 2025 11:56:44 +0200 Subject: [PATCH 4/5] README now Markdown compliant. --- README.md | 52 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 90813d8..2ed0755 100644 --- a/README.md +++ b/README.md @@ -10,57 +10,67 @@ This library provides for this use case some Arduino interfaces, but not all yet ## Table of content -* [Architecture](#architecture) - * [The Principle](#the-principle) - * [Detail](#detail) -* [How to integrate the library?](#how-to-integrate-the-library) - * [Example](#example) -* [Used Libraries](#used-libraries) -* [Issues, Ideas And Bugs](#issues-ideas-and-bugs) -* [License](#license) -* [Contribution](#contribution) +- [Table of content](#table-of-content) +- [Architecture](#architecture) + - [The Principle](#the-principle) + - [Detail](#detail) +- [How to integrate the library?](#how-to-integrate-the-library) + - [Example](#example) +- [Used Libraries](#used-libraries) +- [Issues, Ideas And Bugs](#issues-ideas-and-bugs) +- [License](#license) +- [Contribution](#contribution) -# Architecture +## Architecture -## The Principle +### The Principle ![Principle](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com//BlueAndi/ArduinoNative/master/doc/uml/Principle.plantuml) -## Detail +### Detail ![ArduinoNative](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/BlueAndi/ArduinoNative/master/doc/uml/ArduinoNative.plantuml) ![DynamicFlow](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/BlueAndi/ArduinoNative/master/doc/uml/DynamicFlow.plantuml) -# How to integrate the library? +## How to integrate the library? + 1. Add it to the _platformio.ini_ in your environment to the _lib\_deps_ section: - ``` + + ```text lib_deps = - BlueAndi/ArduinoNative @ ~0.1.0 + BlueAndi/ArduinoNative @ ~0.2.2 ``` + 2. Add this build flags to your _platformio.ini_ in your environment: - ``` + + ```text build_flags = -D _USE_MATH_DEFINES ``` + 3. Call the ```Arduino::setup()``` once and the ```Arduino::loop()``` in a infinite loop in your main entry point function. -## Example +### Example + See [minimal example](./examples/example/). -# Used Libraries +## Used Libraries | Library | Description | License | | ------------------------------------------------------------------ | ---------------------------------------------------------------- | ---------- | | - | - | - | -# Issues, Ideas And Bugs +## Issues, Ideas And Bugs + If you have further ideas or you found some bugs, great! Create a [issue](https://github.com/BlueAndi/ArduinoNative/issues) or if you are able and willing to fix it by yourself, clone the repository and create a pull request. -# License +## License + The whole source code is published under the [MIT license](http://choosealicense.com/licenses/mit/). Consider the different licenses of the used third party libraries too! -# Contribution +## Contribution + Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions. From 5d3cd4041647b324b2e1d86800afb852acc7fc01 Mon Sep 17 00:00:00 2001 From: BlueAndi Date: Sun, 3 Aug 2025 12:14:15 +0200 Subject: [PATCH 5/5] Remove TOC from TOC. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 2ed0755..4ef3487 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,8 @@ Projects have sometimes the need to run on different platforms. For example a ro This library provides for this use case some Arduino interfaces, but not all yet. If something is missing, feel free to contribute, which make our all lifes easier. :-) -## Table of content +## Table of content -- [Table of content](#table-of-content) - [Architecture](#architecture) - [The Principle](#the-principle) - [Detail](#detail)