浏览代码

Slight python restructure

Min 4 年之前
父节点
当前提交
d21b332442
共有 5 个文件被更改,包括 16 次插入13 次删除
  1. 1 1
      msp430emu/__init__.py
  2. 1 3
      msp430emu/__main__.py
  3. 6 0
      msp430emu/emulator.py
  4. 7 8
      readme.md
  5. 1 1
      setup.py

+ 1 - 1
msp430emu/__init__.py

@@ -1 +1 @@
-from . import emulator
+from .emulator import run

+ 1 - 3
msp430emu/__main__.py

@@ -9,6 +9,4 @@ if __name__ == '__main__':
             load = sys.argv[1]
         else:
             print(f"File '{sys.argv[1]}' does not exist")
-    app = emulator.wx.App(False)
-    frame = emulator.EmulatorWindow(None, "MSP430 Emulator", load)
-    app.MainLoop()
+    emulator.run(load)

+ 6 - 0
msp430emu/emulator.py

@@ -371,3 +371,9 @@ class DrawRect(wx.Panel):
             self.dc.SetBrush(wx.Brush(self.RED, wx.SOLID))
             self.dc.DrawRectangle(70, 356, 8, 15)
         del self.dc
+
+
+def run(load=None):
+    app = wx.App(False)
+    frame = EmulatorWindow(None, "MSP430 Emulator", load)
+    app.MainLoop()

+ 7 - 8
readme.md

@@ -4,13 +4,9 @@
 
 More detailed description for multiple platforms will be added.
 
-To build from source:
+Install latest via pip:
 ```bash
-# Build
-python setup.py build
-
-# Install
-python setup.py install
+pip install https://gogs.infcof.com/UCL/msp430emu/archive/master.zip
 ```
 
 ## Work Done
@@ -18,14 +14,17 @@ python setup.py install
 List of features that are added:
 
 - [x] Source build on linux
-- [ ] Source build on windows
+- [x] Source build on windows
 - [ ] Source build on mac
 - [x] Working Emulator
 - [x] Python GUI
 - [x] Blinking LEDs
 - [x] UART Serial output
 - [ ] UART Serial input
-- [ ] Reset and P1.3 button
+- [x] Reset button
+- [ ] Button for P1.3
 - [ ] GPIO Oscilloscope
 - [ ] Port 2 GPIO
+- [ ] Invalid register configuration checks
+- [ ] Information about UART Band
 - [ ] ADC

+ 1 - 1
setup.py

@@ -31,7 +31,7 @@ class BinaryDistribution(Distribution):
 
 
 setup(name='msp430emu',
-      version='0.1',
+      version='0.2',
       description='MSP 430 Emulator',
       author_email='zceemja@ucl.ac.uk',
       packages=['msp430emu'],