Skip to content

Commit

Permalink
Fix WiFi scan results in Web (#1913)
Browse files Browse the repository at this point in the history
* web: re-add wifi scan action, send as json array

* ws: forcibly inline send functions
  • Loading branch information
mcspr authored Sep 20, 2019
1 parent c0c5349 commit deb4657
Show file tree
Hide file tree
Showing 20 changed files with 6,078 additions and 6,060 deletions.
24 changes: 14 additions & 10 deletions code/espurna/config/prototypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ extern "C" {
}

#define UNUSED(x) (void)(x)
#define INLINE inline __attribute__((always_inline))

// -----------------------------------------------------------------------------
// System
Expand Down Expand Up @@ -405,26 +406,29 @@ using ws_on_keycheck_callback_list_t = std::vector<ws_on_keycheck_callback_f>;
void wsSend_P(PGM_P data);
void wsSend_P(uint32_t client_id, PGM_P data);

void wsPost(const ws_on_send_callback_f& callback);
void wsPost(const ws_on_send_callback_list_t& callbacks);
void wsPost(uint32_t client_id, const ws_on_send_callback_list_t& callbacks);
void INLINE wsPost(const ws_on_send_callback_f& callback);
void INLINE wsPost(uint32_t client_id, const ws_on_send_callback_f& callback);
void INLINE wsPost(const ws_on_send_callback_list_t& callbacks);
void INLINE wsPost(uint32_t client_id, const ws_on_send_callback_list_t& callbacks);

void wsPostAll(uint32_t client_id, const ws_on_send_callback_list_t& callbacks);
void wsPostAll(const ws_on_send_callback_list_t& callbacks);
void INLINE wsPostAll(uint32_t client_id, const ws_on_send_callback_list_t& callbacks);
void INLINE wsPostAll(const ws_on_send_callback_list_t& callbacks);

void wsPostSequence(uint32_t client_id, const ws_on_send_callback_list_t& callbacks);
void wsPostSequence(uint32_t client_id, ws_on_send_callback_list_t&& callbacks);
void wsPostSequence(const ws_on_send_callback_list_t& callbacks);
void INLINE wsPostSequence(uint32_t client_id, const ws_on_send_callback_list_t& callbacks);
void INLINE wsPostSequence(uint32_t client_id, ws_on_send_callback_list_t&& callbacks);
void INLINE wsPostSequence(const ws_on_send_callback_list_t& callbacks);

bool wsConnected();
bool wsConnected(uint32_t client_id);
bool INLINE wsConnected();
bool INLINE wsConnected(uint32_t client_id);
bool wsDebugSend(const char* prefix, const char* message);
#endif

// -----------------------------------------------------------------------------
// WIFI
// -----------------------------------------------------------------------------
#include <JustWifi.h>
struct wifi_scan_info_t;
using wifi_scan_f = std::function<void(wifi_scan_info_t& info)>;
using wifi_callback_f = std::function<void(justwifi_messages_t code, char * parameter)>;
void wifiRegister(wifi_callback_f callback);
bool wifiConnected();
Expand Down
Binary file modified code/espurna/data/index.all.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.light.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.lightfox.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.rfbridge.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.rfm69.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.sensor.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.small.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.thermostat.html.gz
Binary file not shown.
3,215 changes: 1,608 additions & 1,607 deletions code/espurna/static/index.all.html.gz.h

Large diffs are not rendered by default.

789 changes: 395 additions & 394 deletions code/espurna/static/index.light.html.gz.h

Large diffs are not rendered by default.

133 changes: 67 additions & 66 deletions code/espurna/static/index.lightfox.html.gz.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit deb4657

Please sign in to comment.