Skip to content

Commit

Permalink
remove all first boot/POST loading
Browse files Browse the repository at this point in the history
  • Loading branch information
psychogenic committed Dec 5, 2024
1 parent dd505ea commit 7982d24
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
from ttboard.boot.demoboard_detect import DemoboardDetect
from ttboard.mode import RPMode
from ttboard.demoboard import DemoBoard, Pins
from ttboard.boot.post import PowerOnSelfTest
# from ttboard.boot.post import PowerOnSelfTest
import ttboard.util.colors as colors

# logging.dumpTicksMsDelta('import')
Expand Down Expand Up @@ -94,33 +94,8 @@ def stopClocking():
print(f"{colors.color(detection_message, detection_color)}")


# take a look at project user button state at startup
# all this "raw" pin access should happen before the DemoBoard object
# is instantiated
run_post_tests = False
# run_post_tests = PowerOnSelfTest.dotest_buttons_held()


tt = startup()

# run a test if clock button held high
# during startup
if run_post_tests:
print('\n\nDoing startup test!')
wait_count = 0
while PowerOnSelfTest.dotest_buttons_held() and wait_count < 10:
print("Waiting for button release...")
time.sleep_ms(250)
wait_count += 1

post = PowerOnSelfTest(tt)
if not post.test_bidirs():
print('ERRORS encountered while running POST bidir test!')
else:
print('Startup test GOOD')
tt.load_default_project()
print('\n\n')


gc.collect()
colors.color_start('magenta', False)
Expand All @@ -132,7 +107,7 @@ def stopClocking():
print(tt)
print()

# logging.dumpTicksMsDelta('boot done')
logging.dumpTicksMsDelta('boot done')
print(f"tt.sdk_version={tt.version}")
# end by being so aggressive on collection
gc.threshold(GCThreshold)
Expand Down

0 comments on commit 7982d24

Please sign in to comment.