Skip to content
Snippets Groups Projects
Select Git revision
  • main
  • mp3_player
  • math_fix
  • return_of_melodic_demo
  • aurora_borealis
  • task_cleanup
  • mixer2
  • dx/fb-save-restore
  • dx/dldldld
  • fpletz/flake
  • positional_captouch_normalize
  • dx/jacksense-headset-mic-only
  • release/1.3.0
  • nicer_patches2
  • fil3s-limit-filesize
  • persistent_captouch_calib
  • captouch
  • nicer_patches
  • allow-reloading-sunmenu
  • wifi-json-error-handling
  • v1.3.0
  • v1.2.0
  • v1.2.0+rc1
  • v1.1.1
  • v1.1.0
  • v1.1.0+rc1
  • v1.0.0
  • v1.0.0+rc6
  • v1.0.0+rc5
  • v1.0.0+rc4
  • v1.0.0+rc3
  • v1.0.0+rc2
  • v1.0.0+rc1
33 results

run.py

Blame
  • Forked from flow3r / flow3r firmware
    Source project has a limited visibility.
    • rahix's avatar
      284311ae
      BIG flow3r · 284311ae
      rahix authored and dx's avatar dx committed
      * sim: Add configurable OLED scale
      * sim: Add configurable OLED aspect ratio
      
        This can be used to fix aspect ratio stretching of badly configured
        screens.
      
      * sim: Make OLED size configurable
      * sim: Implement full-screen mode
      * settings: Fix a type annotation
      284311ae
      History
      BIG flow3r
      rahix authored and dx's avatar dx committed
      * sim: Add configurable OLED scale
      * sim: Add configurable OLED aspect ratio
      
        This can be used to fix aspect ratio stretching of badly configured
        screens.
      
      * sim: Make OLED size configurable
      * sim: Implement full-screen mode
      * settings: Fix a type annotation
    crc_patch.py 342 B
    #!/usr/bin/env python3
    import sys
    import crc16
    
    
    def main():
        data = open(sys.argv[1], 'rb').read()
        crc = crc16.crc16xmodem(data)
        # print(crc)
    
        padded = data + bytes([crc >> 8, crc & 0xFF])
    
        crc = crc16.crc16xmodem(padded)
        # print(crc)
    
        open(sys.argv[1], 'wb').write(padded)
    
    
    if __name__ == "__main__":
        main()