removed some excessive logging

sipo
Ondřej Hruška 6 years ago
parent e471497577
commit 15ebb6ab10
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 10
      comm/messages.c
  2. 3
      comm/msg_bulkwrite.c
  3. 6
      framework/resources.c
  4. 2
      platform/plat_compat.h

@ -2,6 +2,7 @@
// Created by MightyPork on 2017/11/21.
//
#include <framework/system_settings.h>
#include "platform.h"
#include "framework/settings.h"
#include "utils/ini_parser.h"
@ -103,8 +104,13 @@ static void settings_bulkwrite_cb(BulkWrite *bulk, const uint8_t *chunk, uint32_
// clean-up request
if (chunk == NULL) {
ini_parse_end();
settings_load_ini_end();
dbg("INI write complete.");
if (bulk->offset > 0) {
settings_load_ini_end();
dbg("INI write complete");
} else {
dbg("INI write failed");
}
free(bulk);
return;

@ -19,6 +19,9 @@ static TF_Result bulkwrite_lst(TinyFrame *tf, TF_Msg *msg)
// this is a final call before timeout, to clean up
if (msg->data == NULL) {
if (bulk->offset != bulk->len) {
TF_Error("Bulk write ended prematurely with %d written out of %d", (int)bulk->offset, (int)bulk->len);
}
goto close;
}

@ -73,7 +73,7 @@ error_t rsc_claim(Unit *unit, Resource rsc)
assert_param(rsc < RESOURCE_COUNT);
assert_param(unit != NULL);
dbg("%s claims %s", unit->name, rsc_get_name(rsc));
// dbg("%s claims %s", unit->name, rsc_get_name(rsc));
if (RSC_IS_HELD(global_rscmap, rsc)) {
// this whole branch is just reporting the error
@ -156,7 +156,7 @@ void rsc_free(Unit *unit, Resource rsc)
assert_param(rsc_initialized);
assert_param(rsc < RESOURCE_COUNT);
dbg("Free resource %s", rsc_get_name(rsc));
// dbg("Free resource %s", rsc_get_name(rsc));
if (RSC_IS_FREE(global_rscmap, rsc)) return;
@ -211,7 +211,7 @@ void rsc_teardown(Unit *unit)
assert_param(rsc_initialized);
assert_param(unit != NULL);
dbg("Tearing down unit %s", unit->name);
// dbg("Tearing down unit %s", unit->name);
deinit_unit_pins(unit);
for (uint32_t i = 0; i < RSCMAP_LEN; i++) {

@ -22,7 +22,7 @@
#define FLASH_SAVE_BUF_LEN 128 // Static buffer for saving to flash
#define MSG_QUE_SLOT_SIZE 64 // FIXME this should be possible to lower, but there's some bug with bulk transfer / INI parser
#define MSG_QUE_SLOT_SIZE 32 // FIXME this should be possible to lower, but there's some bug with bulk transfer / INI parser
#define RX_QUE_CAPACITY 8 // TinyFrame rx queue size (64 bytes each)
#define TF_MAX_PAYLOAD_RX 512 // TF max Rx payload

Loading…
Cancel
Save