move some heap to psram and some updates

This commit is contained in:
sharandac
2020-08-12 11:03:36 +02:00
parent 33fe453f5e
commit aeb15d34a8
22 changed files with 358 additions and 31 deletions

View File

@@ -75,12 +75,12 @@ uint32_t mainbar_add_tile( uint16_t x, uint16_t y ) {
tile_entrys++;
if ( tile_pos_table == NULL ) {
tile_pos_table = ( lv_point_t * )malloc( sizeof( lv_point_t ) * tile_entrys );
tile_pos_table = ( lv_point_t * )ps_malloc( sizeof( lv_point_t ) * tile_entrys );
if ( tile_pos_table == NULL ) {
log_e("tile_pos_table malloc faild");
while(true);
}
tile = ( lv_tile_t * )malloc( sizeof( lv_tile_t ) * tile_entrys );
tile = ( lv_tile_t * )ps_malloc( sizeof( lv_tile_t ) * tile_entrys );
if ( tile == NULL ) {
log_e("tile malloc faild");
while(true);
@@ -90,14 +90,14 @@ uint32_t mainbar_add_tile( uint16_t x, uint16_t y ) {
lv_point_t *new_tile_pos_table;
lv_tile_t *new_tile;
new_tile_pos_table = ( lv_point_t * )realloc( tile_pos_table, sizeof( lv_point_t ) * tile_entrys );
new_tile_pos_table = ( lv_point_t * )ps_realloc( tile_pos_table, sizeof( lv_point_t ) * tile_entrys );
if ( new_tile_pos_table == NULL ) {
log_e("tile_pos_table realloc faild");
while(true);
}
tile_pos_table = new_tile_pos_table;
new_tile = ( lv_tile_t * )realloc( tile, sizeof( lv_tile_t ) * tile_entrys );
new_tile = ( lv_tile_t * )ps_realloc( tile, sizeof( lv_tile_t ) * tile_entrys );
if ( new_tile == NULL ) {
log_e("tile realloc faild");
while(true);

View File

@@ -226,7 +226,9 @@ void update_Task( void * pvParameters ) {
WiFiClient client;
lv_label_set_text( update_status_label, "start update ..." );
lv_obj_align( update_status_label, update_btn, LV_ALIGN_OUT_BOTTOM_MID, 0, 15 );
lv_obj_align( update_status_label, update_btn, LV_ALIGN_OUT_BOTTOM_MID, 0, 15 );
httpUpdate.rebootOnUpdate( false );
t_httpUpdate_return ret = httpUpdate.update( client, "http://www.neo-guerillaz.de/ttgo-t-watch2020_v1.ino.bin" );
@@ -242,7 +244,7 @@ void update_Task( void * pvParameters ) {
break;
case HTTP_UPDATE_OK:
lv_label_set_text( update_status_label, "update ok" );
lv_label_set_text( update_status_label, "update ok, turn off and on!" );
lv_obj_align( update_status_label, update_btn, LV_ALIGN_OUT_BOTTOM_MID, 0, 15 );
break;
}

View File

@@ -24,7 +24,7 @@
#include "update_check_version.h"
#include "hardware/json_config_psram_allocator.h"
#include "hardware/json_psram_allocator.h"
uint64_t update_check_new_version( void ) {
char url[512]="";

View File

@@ -29,7 +29,7 @@
#include "gui/statusbar.h"
#include "gui/keyboard.h"
#include "hardware/json_config_psram_allocator.h"
#include "hardware/json_psram_allocator.h"
update_config_t update_config;