Skip to content

Commit

Permalink
Merge 6.2 into main
Browse files Browse the repository at this point in the history
Makes the case 5mm shorter
Also sets up "layout" system for various hardware

# Conflicts:
#	firmware/calibrate.py
#	firmware/debug.py
#	firmware/docs/source/conf.py
#	firmware/installer/installer.py
#	firmware/layouts.py
#	firmware/pins.py
#	firmware/requirements.txt
#	firmware/utils.py
#	firmware/version.py
#	firmware/versions/display128x64.py
#	hardware/Button/Button.kicad_pro
#	hardware/PCB/STIC.kicad_pcb
#	hardware/PCB/STIC.kicad_prl
#	hardware/PCB/STIC.kicad_pro
#	hardware/PCB/STIC.kicad_sch
  • Loading branch information
furbrain committed May 4, 2024
1 parent b03338b commit acd2fea
Show file tree
Hide file tree
Showing 14 changed files with 407,232 additions and 155,808 deletions.
Binary file modified case/bigboy-Shell.stl
Binary file not shown.
Binary file modified case/bigboy-mount.stl
Binary file not shown.
Binary file modified case/bigboy.FCStd
Binary file not shown.
2 changes: 1 addition & 1 deletion firmware/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
sys.path.append(os.path.join(os.path.dirname(__file__), '../../..'))

# noinspection PyUnresolvedReferences
# noinspection PyPep8
import firmware.version as v # noqa: E402

project = 'SAP6'
# noinspection PyShadowingBuiltins
copyright = '2023, Phil Underwood'
Expand Down
3 changes: 2 additions & 1 deletion firmware/installer/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

DEFAULT_HW_VERSION = "1.0.0"

DEFAULT_HW_VERSION = "6.1.0"

RESET_DEVICE = False

parser = argparse.ArgumentParser(
Expand Down Expand Up @@ -81,7 +83,6 @@ def clear_folder(path_to_clear):
print("Clear failed: ", os.listdir(path_to_clear))
sys.exit(1)


def find_serial_port():
for tty_file in os.listdir(TTY_SYS_DIR):
dev_data = os.path.join(TTY_SYS_DIR, tty_file, "device/interface")
Expand Down
16 changes: 11 additions & 5 deletions firmware/layouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@
"pins",
"hardware"))

layout_1 = Layout(mag_axes="+X+Y-Z",
grav_axes="-Y-X+Z",
laser_offset=0.157,
pins="PinsA",
hardware="hardware_v1")
layout_6_1 = Layout(mag_axes="+X+Y-Z",
grav_axes="-Y-X+Z",
laser_offset=0.157,
pins="PinsA",
hardware="hardware_v1")

layout_6_2 = Layout(mag_axes="+X+Y-Z",
grav_axes="-Y-X+Z",
laser_offset=0.153,
pins="PinsA",
hardware="hardware_v1")
15 changes: 15 additions & 0 deletions firmware/pins.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,18 @@ class PinsA(Pins):
SDA = board.D7
SCL = board.D8
DRDY = board.D9


class PinsB:
# Brendan's pinout
LASER_EN = board.D0
RX = board.RX
TX = board.TX
BUTTON_A = board.D3
BUTTON_B = board.D2
BUZZER_A = board.D8
BUZZER_B = None
PERIPH_EN = board.D1
SDA = board.SDA
SCL = board.SCL
DRDY = board.D9
5 changes: 3 additions & 2 deletions firmware/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
except ImportError:
pass

LAYOUTS = {(1, 0, 0): layouts.layout_1}
LAYOUTS = {(6, 1, 0): layouts.layout_6_1,
(6, 2, 0): layouts.layout_6_2}

ADJECTIVES = [
"Angry",
Expand Down Expand Up @@ -64,7 +65,7 @@ def get_hw_version() -> Tuple[int, int, int]:
import microcontroller
version = tuple(microcontroller.nvm[-3:])
if version == (255, 255, 255):
version = (1, 0, 0)
version = (6, 1, 0)
return version


Expand Down
116 changes: 2 additions & 114 deletions hardware/Button/Button.kicad_pro
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@
"gencad": "",
"idf": "",
"netlist": "",
"plot": "./fab/",
"plot": "",
"pos_files": "",
"specctra_dsn": "",
"step": "",
Expand All @@ -508,112 +508,6 @@
},
"schematic": {
"annotate_start_num": 0,
"bom_fmt_presets": [],
"bom_fmt_settings": {
"field_delimiter": ",",
"keep_line_breaks": false,
"keep_tabs": false,
"name": "CSV",
"ref_delimiter": ",",
"ref_range_delimiter": "",
"string_delimiter": "\""
},
"bom_presets": [],
"bom_settings": {
"exclude_dnp": false,
"fields_ordered": [
{
"group_by": false,
"label": "Reference",
"name": "Reference",
"show": true
},
{
"group_by": true,
"label": "Value",
"name": "Value",
"show": true
},
{
"group_by": false,
"label": "Datasheet",
"name": "Datasheet",
"show": false
},
{
"group_by": false,
"label": "Footprint",
"name": "Footprint",
"show": true
},
{
"group_by": false,
"label": "Qty",
"name": "${QUANTITY}",
"show": false
},
{
"group_by": true,
"label": "DNP",
"name": "${DNP}",
"show": false
},
{
"group_by": false,
"label": "#",
"name": "${ITEM_NUMBER}",
"show": false
},
{
"group_by": false,
"label": "Allied_Number",
"name": "Allied_Number",
"show": false
},
{
"group_by": false,
"label": "Farnell Part Number",
"name": "Farnell Part Number",
"show": false
},
{
"group_by": false,
"label": "Height",
"name": "Height",
"show": false
},
{
"group_by": false,
"label": "Manufacturer_Name",
"name": "Manufacturer_Name",
"show": false
},
{
"group_by": false,
"label": "Manufacturer_Part_Number",
"name": "Manufacturer_Part_Number",
"show": false
},
{
"group_by": false,
"label": "Description",
"name": "Description",
"show": false
},
{
"group_by": false,
"label": "LCSC part number",
"name": "LCSC part number",
"show": false
}
],
"filter_string": "",
"group_symbols": true,
"name": "",
"sort_asc": true,
"sort_field": "Reference"
},
"connection_grid_size": 50.0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
Expand All @@ -627,11 +521,6 @@
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.25,
"operating_point_overlay_i_precision": 3,
"operating_point_overlay_i_range": "~A",
"operating_point_overlay_v_precision": 3,
"operating_point_overlay_v_range": "~V",
"overbar_offset_ratio": 1.23,
"pin_symbol_size": 0.0,
"text_offset_ratio": 0.08
},
Expand All @@ -647,15 +536,14 @@
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_dissipations": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"99fcb287-88fd-464f-9f69-3e4c0bf057d9",
"Root"
""
]
],
"text_variables": {}
Expand Down
Loading

0 comments on commit acd2fea

Please sign in to comment.