diff options
author | Jenna Fox <a@creativepony.com> | 2012-09-24 12:54:53 +1000 |
---|---|---|
committer | Jenna Fox <a@creativepony.com> | 2012-09-24 12:54:53 +1000 |
commit | 9ffb7706a99d3ca0be55fc23fc8107123c2f3ed1 (patch) | |
tree | 05367dd8ec4e562d60237fc77a954935a2a0209e | |
parent | 808a0bacf449834b19897563ecd6b568d4582757 (diff) | |
download | micronucleus-9ffb7706a99d3ca0be55fc23fc8107123c2f3ed1.tar.gz micronucleus-9ffb7706a99d3ca0be55fc23fc8107123c2f3ed1.tar.bz2 micronucleus-9ffb7706a99d3ca0be55fc23fc8107123c2f3ed1.zip |
Revert "I totally know how to use git. heh."
This reverts commit 808a0bacf449834b19897563ecd6b568d4582757.
-rw-r--r-- | firmware/upload.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/upload.rb b/firmware/upload.rb index 52c108e..7faa19f 100644 --- a/firmware/upload.rb +++ b/firmware/upload.rb @@ -31,8 +31,13 @@ class MicroBoot @info = { flash_length: flash_length, page_size: page_size, +<<<<<<< HEAD + write_sleep: write_sleep.to_f / 1000.0, + pages: (flash_length.to_f / page_size.to_f).ceil, +======= pages: (flash_length.to_f / page_size.to_f).ceil, write_sleep: write_sleep.to_f / 1000.0, +>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6 version: "#{@device.bcdDevice >> 8}.#{@device.bcdDevice & 0xFF}", version_numeric: @device.bcdDevice } @@ -45,9 +50,15 @@ class MicroBoot info = self.info control_transfer(function: :erase_application) +<<<<<<< HEAD info[:pages].times do |index| puts "Erasing: #{((index.to_f / info[:pages].to_f) * 100.0).round}%" if index % 5 == 0 sleep(info[:write_sleep]) # sleep for as many pages as the chip has +======= + # sleep for long enough for application to completely erase + info[:pages].times do + sleep(info[:write_sleep]) +>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6 end end |