Skip to content

Commit e1baaab

Browse files
author
DESKTOP-7VKKLTO\ian
committed
Small help and display updates identified during docs updates
1 parent 8e1347c commit e1baaab

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

src/commands/2wire/sle4442.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ typedef struct __attribute__((packed)) sle44xx_atr_struct {
3838
} sle44xx_atr_t;
3939

4040
static const char* const usage[] = { "sle4442 [init|dump|unlock|write|erase|psc]\r\n\t[-a <address>] [-v <value>] [-p "
41-
"<current psc>] [-n <new psc>] [-h(elp)]",
41+
"<current psc>] [-n <new psc>] [-f <dump file>] [-h(elp)]",
4242
"Initialize and probe: sle4442 init",
4343
"Dump contents: sle4442 dump",
4444
"Unlock card: sle4442 unlock -p 0xffffff",

src/mode/hwhduart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ bool hwhduart_preflight_sanity_check(void){
190190
void hwhduart_periodic(void) {
191191
uint32_t raw;
192192
uint8_t cooked;
193-
if (hwuart_pio_read(&raw, &cooked)) {
193+
if (mode_config.async_print && hwuart_pio_read(&raw, &cooked)) {
194194
// printf("PIO: 0x%04X ", raw);
195195
printf("0x%02x ", cooked);
196196
// ui_format_print_number_2(&periodic_attributes, &cooked);

src/mode/hwled.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ uint32_t hwled_setup_exc(void) {
141141
pio_config.offset,
142142
bio2bufiopin[M_LED_SDO],
143143
(float)mode_config.baudrate,
144-
false);
144+
false);
145+
system_config.num_bits=24;
145146
break;
146147
case M_LED_APA102:
147148
system_bio_update_purpose_and_label(true, M_LED_SDO, BP_PIN_MODE, pin_labels[0]);
@@ -162,14 +163,15 @@ uint32_t hwled_setup_exc(void) {
162163
mode_config.baudrate,
163164
bio2bufiopin[M_LED_SCL],
164165
bio2bufiopin[M_LED_SDO]);
165-
166+
system_config.num_bits=32;
166167
break;
167168
case M_LED_WS2812_ONBOARD: // internal LEDs, stop any in-progress stuff
168169
rgb_irq_enable(false);
169170
rgb_set_all(0, 0, 0);
170171
pio_config.pio = PIO_RGB_LED_PIO;
171172
pio_config.sm = PIO_RGB_LED_SM;
172173
mode_config.baudrate = 800000;
174+
system_config.num_bits=24;
173175
#if BP_VER == 5
174176
logic_analyzer_set_base_pin(RGB_CDO);
175177
#endif
@@ -180,7 +182,7 @@ uint32_t hwled_setup_exc(void) {
180182
}
181183
device_cleanup = mode_config.device;
182184
system_config.subprotocol_name = led_device_type[mode_config.device];
183-
system_config.num_bits=24;
185+
184186
return 1;
185187
}
186188

@@ -249,10 +251,10 @@ void hwled_write(struct _bytecode* result, struct _bytecode* next) {
249251
// only set to full brightness if the top bits from caller are zero
250252
// otherwise, allow the caller to set the global brightness bits for
251253
// more advanced brightness setting.
252-
if ((result->out_data & 0xE0000000) == 0) {
254+
/*if ((result->out_data & 0xE0000000) == 0) {
253255
result->out_data|=(0xff<<24);
254256
//pio_sm_put_blocking(pio_config.pio, pio_config.sm, ((0xff<<24)|result->out_data));
255-
}//else{
257+
}//else{*/
256258
pio_sm_put_blocking(pio_config.pio, pio_config.sm, result->out_data);
257259
//}
258260
break;

src/ui/ui_help.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ bool ui_help_show(bool help_flag,
6363
uint32_t count_of_options) {
6464
if (help_flag) {
6565
ui_help_usage(usage, count_of_usage);
66-
ui_help_options(&options[0], count_of_options);
66+
if(options[0].description!=0) {
67+
ui_help_options(&options[0], count_of_options);
68+
}
6769
return true;
6870
}
6971
return false;

0 commit comments

Comments
 (0)