Merge branch 'master' into pico_sdk

This commit is contained in:
2026-03-29 12:28:36 +03:00
359 changed files with 56129 additions and 6404 deletions

View File

@@ -1,13 +1,12 @@
/*! \file pistatemachine_base.h
* \ingroup StateMachine
* \~\brief
* \~english Some template helpers for PIStateMachine
* \~russian Несколько шаблонов для PIStateMachine
*/
//! \~\file pistatemachine_base.h
//! \~\ingroup StateMachine
//! \~\brief
//! \~english Declares helper types shared by the state machine API
//! \~russian Объявляет вспомогательные типы, общие для API машины состояний
/*
PIP - Platform Independent Primitives
Some template helpers for PIStateMachine
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -37,6 +36,7 @@ public:
virtual uint formatHash() = 0;
};
template<typename... Args>
class Function: public FunctionBase {
public:
@@ -51,10 +51,11 @@ public:
std::function<bool(Args...)> func;
};
template<typename Ret, typename... Args>
FunctionBase * makeFunction(std::function<Ret(Args...)> func) {
auto * ret = new Function<Args...>();
ret->func = func;
ret->func = std::move(func);
return ret;
}