#include #include #include #include #include #include #include #include "cJSON.h" #include "qrcode.h" #include "uart.h" typedef struct LinkCameraModel LinkCameraModel; typedef struct { Gui* gui; Storage* storage; ViewDispatcher* view_dispatcher; View* view; Uart* uart; QRCode* qrcode; uint8_t set_version; } LinkCameraApp; struct LinkCameraModel { bool initialized; bool connected; char* ip; char* event_type; char* ssid; char* password; }; typedef enum { WorkerEventReserved = (1 << 0), // Reserved for StreamBuffer internal event WorkerEventStop = (1 << 1), WorkerEventRx = (1 << 2), } WorkerEventFlags; #define WORKER_EVENTS_MASK (WorkerEventStop | WorkerEventRx) const uint8_t _I_DolphinCommon_56x48_0[] = { 0x01, 0x00, 0xdf, 0x00, 0x00, 0x1f, 0xfe, 0x0e, 0x05, 0x3f, 0x04, 0x06, 0x78, 0x06, 0x30, 0x20, 0xf8, 0x00, 0xc6, 0x12, 0x1c, 0x04, 0x0c, 0x0a, 0x38, 0x08, 0x08, 0x0c, 0x60, 0xc0, 0x21, 0xe0, 0x04, 0x0a, 0x18, 0x02, 0x1b, 0x00, 0x18, 0xa3, 0x00, 0x21, 0x90, 0x01, 0x8a, 0x20, 0x02, 0x19, 0x80, 0x18, 0x80, 0x64, 0x09, 0x20, 0x89, 0x81, 0x8c, 0x3e, 0x41, 0xe2, 0x80, 0x50, 0x00, 0x43, 0x08, 0x01, 0x0c, 0xfc, 0x68, 0x40, 0x61, 0xc0, 0x50, 0x30, 0x00, 0x63, 0xa0, 0x7f, 0x80, 0xc4, 0x41, 0x19, 0x07, 0xff, 0x02, 0x06, 0x18, 0x24, 0x03, 0x41, 0xf3, 0x2b, 0x10, 0x19, 0x38, 0x10, 0x30, 0x31, 0x7f, 0xe0, 0x34, 0x08, 0x30, 0x19, 0x60, 0x80, 0x65, 0x86, 0x0a, 0x4c, 0x0c, 0x30, 0x81, 0xb9, 0x41, 0xa0, 0x54, 0x08, 0xc7, 0xe2, 0x06, 0x8a, 0x18, 0x25, 0x02, 0x21, 0x0f, 0x19, 0x88, 0xd8, 0x6e, 0x1b, 0x01, 0xd1, 0x1b, 0x86, 0x39, 0x66, 0x3a, 0xa4, 0x1a, 0x50, 0x06, 0x48, 0x18, 0x18, 0xd0, 0x03, 0x01, 0x41, 0x98, 0xcc, 0x60, 0x39, 0x01, 0x49, 0x2d, 0x06, 0x03, 0x50, 0xf8, 0x40, 0x3e, 0x02, 0xc1, 0x82, 0x86, 0xc7, 0xfe, 0x0f, 0x28, 0x2c, 0x91, 0xd2, 0x90, 0x9a, 0x18, 0x19, 0x3e, 0x6d, 0x73, 0x12, 0x16, 0x00, 0x32, 0x49, 0x72, 0xc0, 0x7e, 0x5d, 0x44, 0xba, 0x2c, 0x08, 0xa4, 0xc8, 0x82, 0x06, 0x17, 0xe0, 0x81, 0x90, 0x2a, 0x40, 0x61, 0xe1, 0xa2, 0x44, 0x0c, 0x76, 0x2b, 0xe8, 0x89, 0x26, 0x43, 0x83, 0x31, 0x8c, 0x78, 0x0c, 0xb0, 0x48, 0x10, 0x1a, 0xe0, 0x00, 0x63, }; const uint8_t* const _I_DolphinCommon_56x48[] = {_I_DolphinCommon_56x48_0}; const Icon I_DolphinCommon_56x48 = { .width = 56, .height = 48, .frame_count = 1, .frame_rate = 0, .frames = _I_DolphinCommon_56x48}; const uint8_t u8g2_font_5x7_tf[1612] = "\277\0\2\2\3\3\3\4\4\5\7\0\377\6\377\6\0\1\12\2\26\6/ \5\0\275\1!\6\261\261" "\31)\42\7[\267IV\0#\12-\261\253\206\252\206\252\0$\11-\261[\365Ni\1%\10\64\261" "\311\261w\0&\11,\261\213)V\61\5'\5\231\267\31(\7r\261S\315\0)\10r\261\211\251R" "\0*\7k\261I\325j+\12-\261\315(\16\231Q\4,\7[\257S%\0-\6\14\265\31\1." "\6R\261\31\1/\7$\263\217m\0\60\10s\261\253\134\25\0\61\7s\261K\262\65\62\11\64\261S" "\61\307r\4\63\12\64\261\31\71i$\223\2\64\12\64\261\215\252\32\61'\0\65\12\64\261\31z#\231" "\24\0\66\12\64\261SyE\231\24\0\67\12\64\261\31\71\346\230#\0\70\12\64\261S\61\251(\223\2" "\71\12\64\261SQ\246\235\24\0:\7j\261\31q\4;\10\63\257\263\221*\1<\7k\261Mu\1" "=\10\34\263\31\31\215\0>\7k\261\311U\11\77\11s\261k\246\14\23\0@\11\64\261SQ\335H" "\1A\11\64\261SQ\216)\3B\12\64\261Yq\244(G\2C\11\64\261SQ\227I\1D\11\64" "\261Y\321\71\22\0E\11\64\261\31z\345<\2F\10\64\261\31z\345\32G\11\64\261SQ\247\231\6" "H\10\64\261\211rL\63I\7s\261Y\261\65J\10\64\261o\313\244\0K\12\64\261\211*I\231\312" "\0L\7\64\261\311\335#M\11\64\261\211\343\210f\0N\10\64\261\211k\251\63O\11\64\261S\321\231" "\24\0P\12\64\261YQ\216\224\63\0Q\12<\257S\321\134I\243\0R\11\64\261YQ\216\324\14S" "\12\64\261S\61eT&\5T\7s\261Y\261\13U\10\64\261\211\236I\1V\11\64\261\211\316$\25" "\0W\11\64\261\211\346\70b\0X\12\64\261\211\62I\25e\0Y\10s\261IVY\1Z\11\64\261" "\31\71\266G\0[\7s\261\31\261\71\134\11$\263\311(\243\214\2]\7s\261\231\315\21^\5S\271" "k_\6\14\261\31\1`\6R\271\211\1a\10$\261\33Q\251\2b\12\64\261\311yE\71\22\0c" "\6#\261\233Yd\10\64\261\257F\224ie\10$\261Sid\5f\11\64\261\255\312\231#\0g\11" ",\257\33\61\251\214\6h\10\64\261\311yE\63i\10s\261\313HV\3j\11{\257\315\260T\25\0" "k\11\64\261\311U\222\251\14l\7s\261\221]\3m\10$\261IiH\31n\7$\261Y\321\14o" "\10$\261SQ&\5p\11,\257YQ\216\224\1q\10,\257\33Q\246\35r\10$\261YQg\0" "s\10$\261\33\32\15\5t\11\64\261\313q\346\214\4u\7$\261\211f\32v\7c\261IV\5w" "\7$\261\211r\34x\10$\261\211I\252\30y\11,\257\211\62\225%\0z\10$\261\31\261\34\1{" "\10s\261MI\326\1|\5\261\261\71}\11s\261\311Q\305\24\1~\7\24\271K*\1\240\5\0\275" "\1\241\6\261\261I#\242\11\64\257\215#\65g\2\243\10,\261UqV\2\244\12-\261\311i\246\270" "r\0\245\11s\261I\252Z\61\1\246\6\251\261Q\2\247\10{\257\233\252\222\13\250\6K\273I\1\251" "\13=\257[Y\245\251\222N\13\252\6\33\267[I\253\7\35\263\213\262\1\254\6\24\263\31\71\255\5K" "\265\31\256\13=\257[y\244\71uZ\0\257\6\14\273\31\1\260\6[\267\353\2\261\13\65\261\315(\16" "\231Q\34\2\262\6b\265Q\6\263\6b\265\31i\264\6R\271S\0\265\10,\257\211\346H\31\266\10" "\64\261\33j\365\3\267\6R\265\31\1\270\6R\257S\0\271\7c\265K\62\15\272\6\33\267\353\2\273" "\10\35\263\211\245L\0\274\11<\257\311\315\250v\0\275\11<\257\311-\35\263\0\276\12<\257\221:\252" "\250v\0\277\11s\261\313\60\305T\1\300\11\64\261SQ\216)\3\301\11\64\261SQ\216)\3\302\11" "\64\261SQ\216)\3\303\11\64\261SQ\216)\3\304\12\64\261\211I\305\61e\0\305\11\64\261\223*" "\216)\3\306\11\64\261\33\251\32\252%\307\12<\257SQ\227IF\0\310\11\64\261\31z\345<\2\311" "\11\64\261\31z\345<\2\312\11\64\261\31z\345<\2\313\11\64\261\31z\345<\2\314\7s\261Y\261" "\65\315\7s\261Y\261\65\316\7s\261Y\261\65\317\7s\261Y\261\65\320\11\64\261\231iu\215\4\321" "\10\64\261Is\251\63\322\11\64\261S\321\231\24\0\323\11\64\261S\321\231\24\0\324\11\64\261S\321\231" "\24\0\325\11\64\261S\321\231\24\0\326\12\64\261\211IE\63)\0\327\10$\261\211I\252\30\330\11\64" "\261\33\351HG\2\331\10\64\261\211\236I\1\332\10\64\261\211\236I\1\333\10\64\261\211\236I\1\334\12" "\64\261\211\31E\63)\0\335\10s\261IVY\1\336\12\64\261\311+\216\224\63\0\337\11\64\261SQ" "\225V\2\340\12\64\261\313(\216\250T\1\341\11\64\261\255GT\252\0\342\11\64\261\255\322\210J\25\343" "\12\64\261K*\216\250T\1\344\11\64\261\253\341\210J\25\345\11\64\261\223rD\245\12\346\10$\261\33" "i\305\1\347\10k\257\233Y%\0\350\12\64\261\313(\252\64\262\2\351\11\64\261\255U\32Y\1\352\12" "\64\261\213)\252\64\262\2\353\12\64\261I\31\253\64\262\2\354\10s\261\311IV\3\355\7s\261+e" "\65\356\7s\261\253f\65\357\10s\261IYV\3\360\12\64\261\313\310\212\62)\0\361\11\64\261K*" "\255h\6\362\12\64\261\313(\252(\223\2\363\11\64\261\255U\224I\1\364\12\64\261\323XE\231\24\0" "\365\12\64\261K*\252(\223\2\366\12\64\261\253\241\212\62)\0\367\11,\261\323pd\250\0\370\11$" "\261\33i\244\221\0\371\11\64\261\313\250\64\323\0\372\7\64\261m\232i\373\10\64\261\323\60\232i\374\11" "\64\261\253Q\64\323\0\375\11<\257m\312T\226\0\376\12\64\257\311+\312\221\62\0\377\12<\257\253Q" "\224\251,\1\0\0\0\4\377\377\0";