Merge pull request #1527 from debrouxl/minor_improvements_and_fixes

Minor improvements
This commit is contained in:
Scott Shawcroft 2019-02-07 12:36:10 -08:00 committed by GitHub
commit 72f0783b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -125,13 +125,13 @@ double pow(double x, double y)
else if (iy >= 0x3ff00000) {
k = (iy>>20) - 0x3ff; /* exponent */
if (k > 20) {
uint32_t j = ly>>(52-k);
if ((j<<(52-k)) == ly)
yisint = 2 - (j&1);
uint32_t j2 = ly>>(52-k);
if ((j2<<(52-k)) == ly)
yisint = 2 - (j2&1);
} else if (ly == 0) {
uint32_t j = iy>>(20-k);
if ((j<<(20-k)) == iy)
yisint = 2 - (j&1);
uint32_t j2 = iy>>(20-k);
if ((j2<<(20-k)) == (uint32_t)iy)
yisint = 2 - (j2&1);
}
}
}

4
main.c
View File

@ -185,8 +185,8 @@ bool run_code_py(safe_mode_t safe_mode) {
} else {
new_status_color(MAIN_RUNNING);
const char *supported_filenames[] = STRING_LIST("code.txt", "code.py", "main.py", "main.txt");
const char *double_extension_filenames[] = STRING_LIST("code.txt.py", "code.py.txt", "code.txt.txt","code.py.py",
static const char *supported_filenames[] = STRING_LIST("code.txt", "code.py", "main.py", "main.txt");
static const char *double_extension_filenames[] = STRING_LIST("code.txt.py", "code.py.txt", "code.txt.txt","code.py.py",
"main.txt.py", "main.py.txt", "main.txt.txt","main.py.py");
stack_resize();

View File

@ -43,7 +43,7 @@ void load_serial_number(void) {
uint8_t raw_id[COMMON_HAL_MCU_PROCESSOR_UID_LENGTH];
common_hal_mcu_processor_get_uid(raw_id);
const char nibble_to_hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
static const char nibble_to_hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'};
for (int i = 0; i < COMMON_HAL_MCU_PROCESSOR_UID_LENGTH; i++) {
for (int j = 0; j < 2; j++) {