Skip to content

Commit 7f4ef23

Browse files
committed
upd
1 parent dca42a7 commit 7f4ef23

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=FastBot2
2-
version=1.0.3
2+
version=1.0.4
33
author=AlexGyver <[email protected]>
44
maintainer=AlexGyver <[email protected]>
55
sentence=Fast and universal Arduino/ESP8266/ESP32 library for Telegram bot

src/core/core.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
#include <GSON.h>
44
#include <StringUtils.h>
55

6+
#ifndef __AVR__
7+
#include <functional>
8+
#endif
9+
610
#include "Fetcher.h"
711
#include "api.h"
812
#include "bot_config.h"
@@ -22,9 +26,15 @@ enum class Poll : uint8_t {
2226
};
2327

2428
class Core : public Http {
29+
#ifdef __AVR__
2530
typedef void (*CallbackRaw)(Text response);
2631
typedef void (*CallbackResult)(gson::Entry& entry);
2732
typedef void (*CallbackUpdate)(Update& upd);
33+
#else
34+
typedef std::function<void(Text response)> CallbackRaw;
35+
typedef std::function<void(gson::Entry& entry)> CallbackResult;
36+
typedef std::function<void(Update& upd)> CallbackUpdate;
37+
#endif
2838

2939
public:
3040
// разрешение и запрет типов обновлений

0 commit comments

Comments
 (0)