mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-12 23:45:27 +00:00
Merge remote-tracking branch 'origin/main' into mods
This commit is contained in:
@ -310,8 +310,14 @@ template_t g_templates [] = {
|
||||
|
||||
int g_total_templates = sizeof(g_templates)/sizeof(g_templates[0]);
|
||||
|
||||
#if PLATFORM_XR809
|
||||
const char *g_header = "<h1><a href=\"https://github.com/openshwprojects/OpenXR809/\">OpenXR809</a></h1><h3><a href=\"https://www.elektroda.com/rtvforum/viewtopic.php?p=19841301#19841301\">[Read more]</a><a href=\"https://paypal.me/openshwprojects\">[Support project]</a></h3>";
|
||||
|
||||
#else
|
||||
const char *g_header = "<h1><a href=\"https://github.com/openshwprojects/OpenBK7231T/\">OpenBK7231</a></h1><h3><a href=\"https://www.elektroda.com/rtvforum/viewtopic.php?p=19841301#19841301\">[Read more]</a><a href=\"https://paypal.me/openshwprojects\">[Support project]</a></h3>";
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void HTTP_AddBuildFooter(http_request_t *request) {
|
||||
char upTimeStr[128];
|
||||
@ -978,10 +984,17 @@ int HTTP_ProcessPacket(http_request_t *request) {
|
||||
poststr(request,"<form action=\"cfg_pins\">");
|
||||
for( i = 0; i < GPIO_MAX; i++) {
|
||||
int si, ch;
|
||||
|
||||
si = PIN_GetPinRoleForPinIndex(i);
|
||||
ch = PIN_GetPinChannelForPinIndex(i);
|
||||
|
||||
#if PLATFORM_XR809
|
||||
poststr(request,PIN_GetPinNameAlias(i));
|
||||
poststr(request," ");
|
||||
#else
|
||||
sprintf(tmpA, "P%i ",i);
|
||||
poststr(request,tmpA);
|
||||
#endif
|
||||
sprintf(tmpA, "<select name=\"%i\">",i);
|
||||
poststr(request,tmpA);
|
||||
for(j = 0; j < IOR_Total_Options; j++) {
|
||||
|
||||
@ -8,7 +8,9 @@
|
||||
#include "../jsmn/jsmn_h.h"
|
||||
#include "../ota/ota.h"
|
||||
#include "../printnetinfo/printnetinfo.h"
|
||||
#ifdef BK_LITTLEFS
|
||||
#include "../littlefs/our_lfs.h"
|
||||
#endif
|
||||
#include "lwip/sockets.h"
|
||||
#include "../flash_config/flash_config.h"
|
||||
|
||||
@ -290,15 +292,17 @@ static int http_rest_get(http_request_t *request){
|
||||
return http_rest_get_seriallog(request);
|
||||
}
|
||||
|
||||
#ifdef BK_LITTLEFS
|
||||
if (!strcmp(request->url, "api/fsblock")){
|
||||
return http_rest_get_flash(request, LFS_BLOCKS_START, LFS_BLOCKS_LEN);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BK_LITTLEFS
|
||||
#ifdef BK_LITTLEFS
|
||||
if (!strncmp(request->url, "api/lfs/", 8)){
|
||||
return http_rest_get_lfs_file(request);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (!strcmp(request->url, "api/info")){
|
||||
return http_rest_get_info(request);
|
||||
@ -504,15 +508,17 @@ static int http_rest_post(http_request_t *request){
|
||||
if (!strcmp(request->url, "api/ota")){
|
||||
return http_rest_post_flash(request, 0x132000);
|
||||
}
|
||||
#ifdef BK_LITTLEFS
|
||||
if (!strcmp(request->url, "api/fsblock")){
|
||||
return http_rest_post_flash(request, LFS_BLOCKS_START);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BK_LITTLEFS
|
||||
#ifdef BK_LITTLEFS
|
||||
if (!strncmp(request->url, "api/lfs/", 8)){
|
||||
return http_rest_post_lfs_file(request);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
http_setup(request, httpMimeTypeHTML);
|
||||
poststr(request, "POST to ");
|
||||
|
||||
Reference in New Issue
Block a user