ソースを参照

增加err的数量

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 2 年 前
コミット
20b9be4db4
1 ファイル変更3 行追加3 行削除
  1. 3 3
      Applications/foc/mc_error.c

+ 3 - 3
Applications/foc/mc_error.c

@@ -9,8 +9,8 @@ static err_nv_t *_e_nv = NULL;
 static runtime_nv_t *_r_nv = NULL;
 static bool _w_pending = false;
 static bool _w_pending_rt = false;
-#define ERR_MAX_SIZE 200
-#define RUNTIME_MAX_SIZE 20
+#define ERR_MAX_SIZE 255
+#define RUNTIME_MAX_SIZE 50
 
 void mc_err_block_init(void) {
 	_e_nv = (err_nv_t *)page_buff;
@@ -33,7 +33,7 @@ void mc_err_block_init(void) {
 		sys_debug("mc rt crc\n");
 	}
 
-	sys_debug("mc err p: 0x%x\n", _e_nv->node);
+	sys_debug("mc err size %d -%d\n", sizeof(err_node_t) * ERR_MAX_SIZE + sizeof(err_nv_t), sizeof(runtime_node_t) * RUNTIME_MAX_SIZE+ sizeof(runtime_nv_t));
 }
 
 void mc_crit_err_add(u8 code, s16 value1, s16 value2) {