<commit_before>#ifdef __USE_CMSIS
#include "LPC8xx.h"
#endif

#include <cr_section_macros.h>

#include <string.h>

#include "parse_util.h"
#include "cmd.h"
#include "err.h"
#include "frame_buffer.h"

/**
 * Set node address
 * Args: <node-addr>
 */
extern frame_buffer_type tx_buffer;
int cmd_set_node_addr (int argc, uint8_t **argv) {

	if (argc != 2) {
		return E_WRONG_ARGC;
	}
	tx_buffer.header.from_addr=parse_hex(argv[1]);
	return E_OK;
}
<commit_msg>Allow for node address query by using 'N' command without parameters<commit_after>#ifdef __USE_CMSIS
#include "LPC8xx.h"
#endif

#include <cr_section_macros.h>

#include <string.h>

#include "parse_util.h"
#include "cmd.h"
#include "err.h"
#include "frame_buffer.h"

/**
 * Set node address
 * Args: <node-addr>
 */
extern frame_buffer_type tx_buffer;
int cmd_set_node_addr (int argc, uint8_t **argv) {

	if (argc == 1) {
		MyUARTSendStringZ("n ");
		MyUARTPrintHex(tx_buffer.header.from_addr);
		MyUARTSendCRLF();
		return;
	}
	if (argc != 2) {
		return E_WRONG_ARGC;
	}
	tx_buffer.header.from_addr=parse_hex(argv[1]);
	return E_OK;
}

{'fraction_non_alphanumeric': 0.1445562671546203, 'fraction_numerical': 0.008234217749313814, 'mean_word_length': 5.010989010989011, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3359663', 'n_tokens_mistral': 469, 'n_tokens_neox': 454, 'n_words': 95}