Commit Graph
43 Commits
Author SHA1 Message Date
andrey c2e6a9927c refactor: merge adjacent same-condition preprocessor blocks
Merge consecutive #ifdef PIP_HAS_FILESYSTEM / PIP_INTROSPECTION / PIP_CAN
blocks that had no code between them into a single guarded block.
2026-08-25 17:21:01 +03:00
andrey 331ef49991 refactor: simplify redundant PIP_HAS_* preprocessor guards
- drop INTROSPECTION conjunctions (CMake dep table already forces THREADS+SOCKET)
- remove whole-file guards in client_server/process tests (CMake only compiles them when flags are ON)
- normalize single-flag '#if defined(PIP_HAS_X)' to '#ifdef PIP_HAS_X'
2026-08-25 16:57:20 +03:00
andrey 69b22bf95a feat: complete PIP_HAS_* feature guards in code and auto-generate flag summary
Guard PIConnection, thread primitives, PICodeParser and other feature
code behind PIP_HAS_THREADS/PIP_HAS_FILESYSTEM. In CMake generate the
feature flags summary from the single PIP_HAS_FLAGS list (used by the
add_definitions loop as well), default ICU to OFF and make introspection
also require PIP_HAS_SOCKET. Build system/thread test suites only when
the corresponding feature flags are enabled.
2026-08-25 11:14:25 +03:00
andrey 8fc2be8dd9 fix: complete PIP_HAS_* flag matrix and restore ESP32/FreeRTOS support
- CMake: disable thread/socket-dependent modules (http_client, mqtt_client,
  client_server) and fftw when the required feature flags are off;
  client_server/cloud no longer tied to the crypt option
- host utils gated on filesystem and the modules they need
- Pico keeps the minimal set; generic FreeRTOS (ESP32) keeps filesystem,
  sockets and serial as in master, module set limited to crypt/compress/io_utils
- PICAN, PIBroadcast, PIPackedTCP vanish without socket+threads
- PISerial: restore PISERIAL_NO_PINS (auto-enabled on PIP_EMBEDDED)
- PIFile: FREERTOS uses fopen/stat (no fopen64 in ESP-IDF newlib)
- drop invalid PICout buffer guards, guard PIObject::deleteLater,
  remove (void)destroying hack, fake PIHIDevice non-Linux stub and the
  redundant PICO_SDK guard in code_model_generator
2026-08-22 19:23:22 +03:00
andrey 858d205fd3 fix: guard PIObject dump diagnostics by PIP_INTROSPECTION and drop PIP_FORCE_NO_PIINTROSPECTION
- invert friend block in piobject.h (friends needed when introspection
  is enabled) and remove dead friend PIObjectManager
- guard PIObject::dump()/dumpApplication()/dumpApplicationToFile()
  declarations and definitions by PIP_INTROSPECTION
  (dumpApplicationToFile additionally requires PIP_HAS_FILESYSTEM)
- guard dumpApplicationToFile() call in __sighandler__ by
  PIP_INTROSPECTION && PIP_HAS_FILESYSTEM
- replace '#if defined(PIP_INTROSPECTION) && !defined(PIP_FORCE_NO_PIINTROSPECTION)'
  with plain '#ifdef PIP_INTROSPECTION' everywhere, remove PIP_FORCE_NO_PIINTROSPECTION
- fix broken PIINTROSPECTION_CONTAINER_ALLOC(T, (as - ...)) in
  pideque.h/pivector.h ('as' no longer exists, use new_rsize)
2026-08-22 13:44:58 +03:00
andrey e2c0445c1b remove some unused defines 2026-08-12 14:04:49 +03:00
andrey 077ac9887b refactor: rename PIP_NO_\* to PIP_HAS_\* with inverted logic
All feature flags now use positive naming (enabled by default):
- PIP_HAS_FILESYSTEM, PIP_HAS_THREADS, PIP_HAS_SOCKET
- PIP_HAS_PROCESS, PIP_HAS_DYNLIB, PIP_HAS_FFT, PIP_HAS_SERIAL

Preprocessor guards inverted:
- #ifndef PIP_NO_X → #ifdef PIP_HAS_X
- #ifdef PIP_NO_X → #ifndef PIP_HAS_X

CMake options default ON instead of OFF.
Platform blocks set flags OFF to disable features.

85 files transformed via Python script + 2 manual fixes.
2026-08-11 19:51:42 +03:00
andrey 4d8b743075 refactor: migrate MICRO_PIP to fine-grained feature flags
Replace monolithic MICRO_PIP/PIP_MICRO with granular flags:

Feature flags (CMake options + platform auto-detection):
- PIP_NO_FILESYSTEM, PIP_NO_THREADS, PIP_NO_SOCKET
- PIP_NO_PROCESS, PIP_NO_DYNLIB, PIP_NO_FFT, PIP_NO_SERIAL

Embedded optimization flag:
- PIP_EMBEDDED (auto-set for Pico SDK and FreeRTOS)
  Controls buffer sizes, time stubs, terminal fallback, init stubs

Platform blocks in CMakeLists.txt:
- Pico SDK: auto-disables FS, PROCESS, DYNLIB, FFT, SERIAL;
  conditionally disables THREADS (no FreeRTOS) and SOCKET (no LWIP)
- FreeRTOS: auto-disables FS, PROCESS, DYNLIB, FFT, SERIAL;
  conditionally disables SOCKET (no LWIP)
- Android: auto-disables PROCESS, DYNLIB, FFT

Updated 96 files across libs/, utils/, tests/, and CMakeLists.txt.
Builds verified for Linux (547 tests pass) and Pico SDK (100%).
Removed all MICRO_PIP and PIP_MICRO references (0 remaining).
2026-08-11 14:34:59 +03:00
andrey c60a682279 missing include 2026-01-02 20:48:37 +03:00
peri4 caa7880cc4 get rid of piForeach
apply some code analyzer recommendations
ICU flag now check if libicu exists
prepare for more accurate growth of containers (limited PoT, then constantly increase size)
2024-11-20 20:01:47 +03:00
peri4 e186e0adff shorter thread names 2024-09-17 15:58:06 +03:00
peri4 d299a1f386 support for multi ctor CONNECTL 2023-12-12 22:05:06 +03:00
peri4 3391d88460 version 3.8.2
PIObject::Connection::disconnect() now const
PIObject::deleted now public
2023-01-26 23:54:17 +03:00
peri4 c2b8a8d6da code format 2022-12-14 14:13:52 +03:00
peri4 57ed40912d piDeleteAll and piDeleteAllAndClear 2022-11-13 22:55:10 +03:00
peri4 4994d0bf66 condvar fixes 2022-11-10 14:11:40 +03:00
peri4 398d760ba9 PIObject::deleteLater important fix
PIWaitEvent::sleep() method
PITimer thread imp wait optimization, migrate to interruptable sleeps
2022-11-10 12:26:08 +03:00
Бычков Андрей adef5b6781 PIMap some doc 2022-08-09 15:54:53 +03:00
peri4 8551499a5e PICout refactoring, new SHSTKMacros 2022-08-07 22:07:26 +03:00
peri4 1028233553 version 2.91.0, PITextStream works 2022-05-13 11:26:01 +03:00
peri4 0b3ee4bb6a doc ru 2022-05-05 22:31:59 +03:00
peri4 2bbdbc3ac9 PIIODevice registration dramatically optimization 2022-04-30 11:21:57 +03:00
peri4 6881fd13b7 PIConstChars 2022-04-29 23:53:07 +03:00
Andrey 8c8553a6af PIObject Property const char * 2022-04-29 18:17:03 +03:00
peri4 6485d81025 piobject metasystem memory and performance optimization 2022-04-22 15:35:25 +03:00
peri4 20e0771331 doc ru 2022-03-18 01:28:07 +03:00
peri4 7a26ae7292 doc ru 2022-03-17 18:13:02 +03:00
peri4 54b5372356 doxygen @ tags replaced to \ 2022-03-14 21:19:31 +03:00
Andrey 8296e9a32b add FreeRTOS support for PIThread PIMutex PIConditionVariable 2022-01-21 14:15:42 +03:00
Andrey a7df53fbfe platformio_pre.py 2022-01-14 18:15:56 +03:00
peri4 a2a205cfd2 version 2.33.0
piMinSleep() method
2021-11-16 14:43:57 +03:00
Andrey 48c885e12a PIThreadNotifier, rewrite PIObject::deleteLater()
tests for PIThreadNotifier and PIObject::deleteLater()
2021-10-29 18:20:48 +03:00
Andrey 6e5a5a6ade remove msleep, clean PIConditionVariable, rewrite pipipelinethread, etc... 2021-10-29 16:52:03 +03:00
peri4 c404688bbd more safety for PIObject::Connection::disconnect() 2021-10-04 21:57:34 +03:00
peri4 aa76a15f40 version 2.32.0
PIObject::Connection struct
2021-10-04 21:50:49 +03:00
Andrey 46571ac39f piDisconnectAll private 2021-10-04 14:18:23 +03:00
peri4 a009221092 pidisconnect now work with lambdas 2021-09-30 16:21:28 +03:00
andrey 5cc8ef1eb0 fail reconnect 2021-08-20 18:25:59 +03:00
andrey 25def958a1 rename doc macros 2021-08-04 16:31:32 +03:00
peri4 4584d9c639 PIObject::deleted now has 1 argument
PIIODevice small refactoring
new PIIODevice virtual methods: threadedReadTerminated() and threadedWriteTerminated()
PIIODevice::stop now accept bool "hard" instead of "wait"

PIStreamPacker new features: packet size crypt and aggressive optimization
2021-04-07 22:13:56 +03:00
peri4 298765b7d8 new class PIVariantSimple
PIObject::CONNECTU_QUEUED moved to PIVariantSimple
static_assert on undeclared operators PIByteArray << and >> with complex types
2020-10-01 21:50:41 +03:00
peri4 51c7355af4 version 2.8.0
new PIObject::deleteLater method
decompose piobject.h to 2 files
2020-09-18 14:59:24 +03:00
peri4 ccd6a9888f tree changes 2020-08-19 00:47:05 +03:00