├── doc ├── media │ ├── OPAVES_Mk-I.jpg │ ├── kicad_render │ │ ├── MK-I.png │ │ ├── MK-I-rev-B-2.png │ │ ├── MK-I-rev-B-3.png │ │ ├── MK-I-rev-B-4.png │ │ └── MK-I-rev-B.png │ ├── OPAVES_Lulzbot_mini.png │ ├── OPAVES_hardware_overview.png │ ├── build_pictures │ │ ├── build_picture_00.jpg │ │ ├── build_picture_01.jpg │ │ ├── build_picture_02.jpg │ │ ├── build_picture_03.jpg │ │ ├── build_picture_04.jpg │ │ ├── build_picture_05.jpg │ │ ├── build_picture_06.jpg │ │ ├── build_picture_07.jpg │ │ ├── build_picture_08.jpg │ │ ├── build_picture_09.jpg │ │ ├── build_picture_10.jpg │ │ ├── build_picture_11.jpg │ │ ├── build_picture_12.jpg │ │ ├── build_picture_13.jpg │ │ ├── build_picture_14.jpg │ │ ├── build_picture_15.jpg │ │ ├── build_picture_16.jpg │ │ ├── build_picture_17.jpg │ │ ├── build_picture_18.jpg │ │ ├── build_picture_19.jpg │ │ ├── build_picture_20.jpg │ │ ├── build_picture_21.jpg │ │ ├── build_picture_22.jpg │ │ ├── build_picture_23.jpg │ │ ├── build_picture_24.jpg │ │ ├── build_picture_25.jpg │ │ ├── build_picture_26.jpg │ │ ├── build_picture_27.jpg │ │ ├── build_picture_28.jpg │ │ ├── build_picture_29.jpg │ │ ├── build_picture_30.jpg │ │ ├── build_picture_31.jpg │ │ ├── build_picture_32.jpg │ │ ├── build_picture_33.jpg │ │ ├── build_picture_34.jpg │ │ ├── build_picture_35.jpg │ │ ├── build_picture_36.jpg │ │ ├── build_picture_37.jpg │ │ ├── build_picture_38.jpg │ │ └── build_picture_39.jpg │ └── demonstrator_requirements │ │ ├── cpu_usage.png │ │ ├── memory_usage.png │ │ ├── range_sensors.png │ │ └── safety_subsystems.png ├── software_design.md └── hardware_design.md ├── hardware ├── 3D_models │ ├── rim.fcstd │ ├── tire.fcstd │ ├── wheel.fcstd │ ├── front_hub.fcstd │ ├── for_printing │ │ ├── rim.stl │ │ ├── tire.stl │ │ ├── wheel.stl │ │ ├── front_bumper.stl │ │ ├── front_hub_left.stl │ │ ├── front_hub_right.stl │ │ ├── lower_front_bom.stl │ │ ├── upper_front_bom.stl │ │ ├── camera_mount_base.stl │ │ ├── camera_mount_top.stl │ │ ├── payload_platform.stl │ │ ├── rear_wheel_mount_1.stl │ │ ├── rear_wheel_mount_2.stl │ │ ├── steering_linkage.stl │ │ ├── front_bom_mounting_block.stl │ │ ├── payload_platform_for_rpi_zero.stl │ │ ├── rear_wheel_mount_dual_motor_1.stl │ │ └── rear_wheel_mount_dual_motor_2.stl │ ├── front_bumper.fcstd │ ├── lower_front_bom.fcstd │ ├── rear_wheel_mount.fcstd │ ├── steering_linkage.fcstd │ ├── upper_front_bom.fcstd │ ├── assembly │ │ ├── front_assembly.fcstd │ │ ├── rear_assembly.fcstd │ │ ├── wheel_assembly.fcstd │ │ └── payload_rpi_zero.fcstd │ ├── front_bom_mounting_block.fcstd │ ├── off_the_shelf │ │ ├── servo_arm.fcstd │ │ ├── powerHD_D65_servo.fcstd │ │ └── TAMIYA_HIgh_Speed_Gear_Box.fcstd │ ├── rear_wheel_mount_dual_motor.fcstd │ └── payload_platforms │ │ ├── camera_mount_top.fcstd │ │ ├── payload_platform.fcstd │ │ ├── camera_mount_base.fcstd │ │ └── payload_platform_for_rpi_zero.fcstd ├── electronic │ ├── components │ │ └── OPAVES_components.dcm │ ├── MK1 │ │ ├── MK1_BOM_and_prices.ods │ │ ├── rev_A │ │ │ ├── OPAVES_MkI_rev_A_gerber.zip │ │ │ ├── OPAVES_MkI_rev_A_schematics.pdf │ │ │ └── gerber │ │ │ │ └── MK1.GML │ │ ├── rev_B │ │ │ ├── OPAVES_MkI_rev_B_gerber.zip │ │ │ ├── OPAVES_MkI_rev_B_PCB_layout.pdf │ │ │ ├── OPAVES_MkI_rev_B_schematics.pdf │ │ │ └── gerber │ │ │ │ └── MK1.GML │ │ ├── fp-lib-table │ │ └── MK1.pro │ ├── MK2 │ │ ├── rev_A │ │ │ ├── mk2_rev_A_gerber.zip │ │ │ └── gerber │ │ │ │ ├── MK2.GML │ │ │ │ └── MK2.TXT │ │ ├── fp-lib-table │ │ ├── MK2.pro │ │ └── motor.sch │ ├── encoder │ │ ├── rev_B │ │ │ ├── OPAVES_encoder_rev_B_gerber.zip │ │ │ ├── OPAVES_encoder_rev_B_schematics.pdf │ │ │ └── gerber │ │ │ │ ├── encoder.TXT │ │ │ │ ├── encoder.GBS │ │ │ │ ├── encoder.GTS │ │ │ │ └── encoder.GML │ │ ├── rev_A │ │ │ ├── OPAVES_Encoder_rev_A_schematics.pdf │ │ │ └── gerber │ │ │ │ ├── encoder-B.Mask.gbr │ │ │ │ ├── encoder-Edge.Cuts.gbr │ │ │ │ └── encoder-F.Mask.gbr │ │ ├── encoder-cache.lib │ │ └── encoder.pro │ └── footprints.pretty │ │ ├── Pololu_StepUp_Regulator.kicad_mod │ │ ├── Raspberry_Pi_B_Mounting_Holes.kicad_mod │ │ ├── DP3T_switch.kicad_mod │ │ ├── Pololu_StepUp_StepDown_Regulator.kicad_mod │ │ ├── Steering_Assembly.kicad_mod │ │ ├── DRV5013_Hall_Sensor_TO-92_Inline.kicad_mod │ │ ├── Pololu_VL53L0x_Carrier.kicad_mod │ │ ├── FTSH-110-XX-XX-DV-XX.kicad_mod │ │ ├── AdaFruit_BNO055_Breakout.kicad_mod │ │ ├── LGA-28.kicad_mod │ │ ├── TAMIYA_HIgh_Speed_Gearbox.kicad_mod │ │ ├── RN4871.kicad_mod │ │ └── Pololu_TB6612.kicad_mod └── cern_ohl_v_1_2_howto.pdf ├── .gitmodules ├── software ├── board_support │ ├── vl53l0x │ │ ├── c_driver │ │ │ ├── vl53l0x_api.h │ │ │ ├── vl53l0x_def.h │ │ │ ├── vl53l0x_device.h │ │ │ ├── vl53l0x_tuning.h │ │ │ ├── vl53l0x_types.h │ │ │ ├── Release_Notes.html │ │ │ ├── vl53l0x_api_core.c │ │ │ ├── vl53l0x_api_core.h │ │ │ ├── vl53l0x_api_ranging.c │ │ │ ├── vl53l0x_api_ranging.h │ │ │ ├── vl53l0x_api_strings.c │ │ │ ├── vl53l0x_api_strings.h │ │ │ ├── vl53l0x_platform_log.h │ │ │ ├── vl53l0x_api_calibration.c │ │ │ ├── vl53l0x_api_calibration.h │ │ │ ├── VL53L0X_API_v1.0.2.4823_externalx.chm │ │ │ ├── vl53l0x_interrupt_threshold_settings.h │ │ │ └── vl53l0x_platform_log.c │ │ ├── platform │ │ │ └── vl53l0x_platform.h │ │ └── vl53l0x.gpr │ ├── OPAVES_MkI_Board.gpr │ └── src │ │ ├── board.ads │ │ ├── board-ble.ads │ │ ├── board-leds.ads │ │ ├── board-parameters.ads │ │ ├── board-motor_encoder.ads │ │ ├── board-logging.adb │ │ ├── board-comm.ads │ │ ├── board-logging.ads │ │ ├── board-ble.adb │ │ ├── board-leds.adb │ │ ├── board-imu.ads │ │ ├── board-steering.adb │ │ ├── board-steering.ads │ │ └── board-motor.ads ├── tests_database │ ├── suppress.adc │ ├── common │ │ └── gnattest_generated.ads │ ├── gnattest_main_suite.ads │ ├── test_OPAVES_MkI.gpr │ ├── databases-instantiations-test_data-tests-suite.ads │ ├── databases-instantiations-test_data-tests-float_databases-test_data-tests-suite.ads │ ├── databases-instantiations-test_data-tests-integer_databases-test_data-tests-suite.ads │ ├── databases-instantiations-test_data-tests-float_databases-database_type_test_data-database_type_tests-suite.ads │ ├── databases-instantiations-test_data-tests-integer_databases-database_type_test_data-database_type_tests-suite.ads │ ├── test_runner.adb │ ├── gnattest_common.gpr │ ├── test_driver.gpr │ ├── databases-instantiations-test_data-tests-float_databases-test_data-tests-suite.adb │ ├── databases-instantiations-test_data-tests-integer_databases-test_data-tests-suite.adb │ ├── databases-instantiations-test_data-tests-suite.adb │ ├── gnattest_main_suite.adb │ ├── databases-instantiations-test_data-tests-float_databases-database_type_test_data-database_type_tests-suite.adb │ └── databases-instantiations-test_data-tests-integer_databases-database_type_test_data-database_type_tests-suite.adb ├── prove │ ├── spark.adc │ └── target.atp ├── host │ ├── host.gpr │ ├── opaves_host.ads │ └── main.adb ├── test-ble │ ├── blink.gpr │ ├── ble.ads │ └── blink.adb ├── coding_standard ├── src │ ├── opaves-comm.ads │ ├── opaves-comm-serial.ads │ ├── last_chance_handler.ads │ ├── opaves.ads │ ├── opaves-comm-crtp.ads │ ├── opaves-ble.ads │ ├── opaves-commander.ads │ ├── sensors.ads │ ├── opaves-comm-crtp.adb │ ├── opaves-types.ads │ ├── opaves-wheel_speed.ads │ ├── last_chance_handler.adb │ ├── main.adb │ ├── databases.adb │ ├── dimension_types.ads │ ├── opaves-parameters.ads │ ├── databases-instantiations.adb │ ├── databases-instantiations.ads │ └── databases-generics.ads └── OPAVES_MkII.gpr ├── CONTRIBUTING.md ├── .gitignore ├── README.md └── appveyor.yml /doc/media/OPAVES_Mk-I.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/OPAVES_Mk-I.jpg -------------------------------------------------------------------------------- /hardware/3D_models/rim.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/rim.fcstd -------------------------------------------------------------------------------- /hardware/3D_models/tire.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/tire.fcstd -------------------------------------------------------------------------------- /doc/media/kicad_render/MK-I.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/kicad_render/MK-I.png -------------------------------------------------------------------------------- /hardware/3D_models/wheel.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/wheel.fcstd -------------------------------------------------------------------------------- /hardware/electronic/components/OPAVES_components.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /doc/media/OPAVES_Lulzbot_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/OPAVES_Lulzbot_mini.png -------------------------------------------------------------------------------- /hardware/3D_models/front_hub.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/front_hub.fcstd -------------------------------------------------------------------------------- /hardware/cern_ohl_v_1_2_howto.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/cern_ohl_v_1_2_howto.pdf -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "software/Certyflie"] 2 | path = software/Certyflie 3 | url = git@github.com:AdaCore/Certyflie.git 4 | -------------------------------------------------------------------------------- /doc/media/OPAVES_hardware_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/OPAVES_hardware_overview.png -------------------------------------------------------------------------------- /doc/media/kicad_render/MK-I-rev-B-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/kicad_render/MK-I-rev-B-2.png -------------------------------------------------------------------------------- /doc/media/kicad_render/MK-I-rev-B-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/kicad_render/MK-I-rev-B-3.png -------------------------------------------------------------------------------- /doc/media/kicad_render/MK-I-rev-B-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/kicad_render/MK-I-rev-B-4.png -------------------------------------------------------------------------------- /doc/media/kicad_render/MK-I-rev-B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/kicad_render/MK-I-rev-B.png -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/rim.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/rim.stl -------------------------------------------------------------------------------- /hardware/3D_models/front_bumper.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/front_bumper.fcstd -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/tire.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/tire.stl -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/wheel.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/wheel.stl -------------------------------------------------------------------------------- /hardware/3D_models/lower_front_bom.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/lower_front_bom.fcstd -------------------------------------------------------------------------------- /hardware/3D_models/rear_wheel_mount.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/rear_wheel_mount.fcstd -------------------------------------------------------------------------------- /hardware/3D_models/steering_linkage.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/steering_linkage.fcstd -------------------------------------------------------------------------------- /hardware/3D_models/upper_front_bom.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/upper_front_bom.fcstd -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_00.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_00.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_01.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_02.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_03.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_04.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_05.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_06.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_07.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_08.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_09.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_10.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_11.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_12.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_13.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_14.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_15.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_16.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_17.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_18.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_19.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_20.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_21.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_22.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_23.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_24.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_25.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_26.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_27.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_28.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_28.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_29.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_30.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_31.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_31.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_32.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_32.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_33.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_33.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_34.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_34.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_35.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_36.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_36.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_37.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_37.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_38.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_38.jpg -------------------------------------------------------------------------------- /doc/media/build_pictures/build_picture_39.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/build_pictures/build_picture_39.jpg -------------------------------------------------------------------------------- /hardware/electronic/MK1/MK1_BOM_and_prices.ods: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/electronic/MK1/MK1_BOM_and_prices.ods -------------------------------------------------------------------------------- /doc/media/demonstrator_requirements/cpu_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/demonstrator_requirements/cpu_usage.png -------------------------------------------------------------------------------- /doc/software_design.md: -------------------------------------------------------------------------------- 1 | # Overall architecture 2 | # Control 3 | # Communication 4 | # Database and logging 5 | # Sensors and situation awerness 6 | -------------------------------------------------------------------------------- /hardware/3D_models/assembly/front_assembly.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/assembly/front_assembly.fcstd -------------------------------------------------------------------------------- /hardware/3D_models/assembly/rear_assembly.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/assembly/rear_assembly.fcstd -------------------------------------------------------------------------------- /hardware/3D_models/assembly/wheel_assembly.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/assembly/wheel_assembly.fcstd -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/front_bumper.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/front_bumper.stl -------------------------------------------------------------------------------- /hardware/3D_models/front_bom_mounting_block.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/front_bom_mounting_block.fcstd -------------------------------------------------------------------------------- /hardware/3D_models/off_the_shelf/servo_arm.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/off_the_shelf/servo_arm.fcstd -------------------------------------------------------------------------------- /hardware/3D_models/assembly/payload_rpi_zero.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/assembly/payload_rpi_zero.fcstd -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/front_hub_left.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/front_hub_left.stl -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/front_hub_right.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/front_hub_right.stl -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/lower_front_bom.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/lower_front_bom.stl -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/upper_front_bom.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/upper_front_bom.stl -------------------------------------------------------------------------------- /hardware/electronic/MK2/rev_A/mk2_rev_A_gerber.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/electronic/MK2/rev_A/mk2_rev_A_gerber.zip -------------------------------------------------------------------------------- /doc/media/demonstrator_requirements/memory_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/demonstrator_requirements/memory_usage.png -------------------------------------------------------------------------------- /doc/media/demonstrator_requirements/range_sensors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/demonstrator_requirements/range_sensors.png -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/camera_mount_base.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/camera_mount_base.stl -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/camera_mount_top.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/camera_mount_top.stl -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/payload_platform.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/payload_platform.stl -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/rear_wheel_mount_1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/rear_wheel_mount_1.stl -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/rear_wheel_mount_2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/rear_wheel_mount_2.stl -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/steering_linkage.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/steering_linkage.stl -------------------------------------------------------------------------------- /hardware/3D_models/rear_wheel_mount_dual_motor.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/rear_wheel_mount_dual_motor.fcstd -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_api.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_api.h -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_def.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_def.h -------------------------------------------------------------------------------- /hardware/3D_models/off_the_shelf/powerHD_D65_servo.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/off_the_shelf/powerHD_D65_servo.fcstd -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_device.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_device.h -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_tuning.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_tuning.h -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_types.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_types.h -------------------------------------------------------------------------------- /doc/media/demonstrator_requirements/safety_subsystems.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/doc/media/demonstrator_requirements/safety_subsystems.png -------------------------------------------------------------------------------- /hardware/3D_models/payload_platforms/camera_mount_top.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/payload_platforms/camera_mount_top.fcstd -------------------------------------------------------------------------------- /hardware/3D_models/payload_platforms/payload_platform.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/payload_platforms/payload_platform.fcstd -------------------------------------------------------------------------------- /hardware/electronic/MK1/rev_A/OPAVES_MkI_rev_A_gerber.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/electronic/MK1/rev_A/OPAVES_MkI_rev_A_gerber.zip -------------------------------------------------------------------------------- /hardware/electronic/MK1/rev_B/OPAVES_MkI_rev_B_gerber.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/electronic/MK1/rev_B/OPAVES_MkI_rev_B_gerber.zip -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/Release_Notes.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/Release_Notes.html -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_api_core.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_api_core.c -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_api_core.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_api_core.h -------------------------------------------------------------------------------- /software/board_support/vl53l0x/platform/vl53l0x_platform.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/platform/vl53l0x_platform.h -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/front_bom_mounting_block.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/front_bom_mounting_block.stl -------------------------------------------------------------------------------- /hardware/3D_models/payload_platforms/camera_mount_base.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/payload_platforms/camera_mount_base.fcstd -------------------------------------------------------------------------------- /hardware/electronic/MK1/fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name OPAVES_Footprints)(type KiCad)(uri "$(KIPRJMOD)/../footprints.pretty")(options "")(descr "")) 3 | ) 4 | -------------------------------------------------------------------------------- /hardware/electronic/MK1/rev_A/OPAVES_MkI_rev_A_schematics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/electronic/MK1/rev_A/OPAVES_MkI_rev_A_schematics.pdf -------------------------------------------------------------------------------- /hardware/electronic/MK1/rev_B/OPAVES_MkI_rev_B_PCB_layout.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/electronic/MK1/rev_B/OPAVES_MkI_rev_B_PCB_layout.pdf -------------------------------------------------------------------------------- /hardware/electronic/MK1/rev_B/OPAVES_MkI_rev_B_schematics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/electronic/MK1/rev_B/OPAVES_MkI_rev_B_schematics.pdf -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_api_ranging.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_api_ranging.c -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_api_ranging.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_api_ranging.h -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_api_strings.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_api_strings.c -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_api_strings.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_api_strings.h -------------------------------------------------------------------------------- /software/tests_database/suppress.adc: -------------------------------------------------------------------------------- 1 | pragma Assertion_Policy (Pre => Ignore); 2 | pragma Assertion_Policy (Post => Ignore); 3 | pragma Assertion_Policy (Ghost => Check); 4 | -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_platform_log.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_platform_log.h -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/payload_platform_for_rpi_zero.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/payload_platform_for_rpi_zero.stl -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/rear_wheel_mount_dual_motor_1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/rear_wheel_mount_dual_motor_1.stl -------------------------------------------------------------------------------- /hardware/3D_models/for_printing/rear_wheel_mount_dual_motor_2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/for_printing/rear_wheel_mount_dual_motor_2.stl -------------------------------------------------------------------------------- /hardware/3D_models/off_the_shelf/TAMIYA_HIgh_Speed_Gear_Box.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/off_the_shelf/TAMIYA_HIgh_Speed_Gear_Box.fcstd -------------------------------------------------------------------------------- /hardware/electronic/encoder/rev_B/OPAVES_encoder_rev_B_gerber.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/electronic/encoder/rev_B/OPAVES_encoder_rev_B_gerber.zip -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_api_calibration.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_api_calibration.c -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_api_calibration.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_api_calibration.h -------------------------------------------------------------------------------- /hardware/electronic/encoder/rev_A/OPAVES_Encoder_rev_A_schematics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/electronic/encoder/rev_A/OPAVES_Encoder_rev_A_schematics.pdf -------------------------------------------------------------------------------- /hardware/electronic/encoder/rev_B/OPAVES_encoder_rev_B_schematics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/electronic/encoder/rev_B/OPAVES_encoder_rev_B_schematics.pdf -------------------------------------------------------------------------------- /hardware/3D_models/payload_platforms/payload_platform_for_rpi_zero.fcstd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/hardware/3D_models/payload_platforms/payload_platform_for_rpi_zero.fcstd -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/VL53L0X_API_v1.0.2.4823_externalx.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/VL53L0X_API_v1.0.2.4823_externalx.chm -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_interrupt_threshold_settings.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdaCore/OPAVES/HEAD/software/board_support/vl53l0x/c_driver/vl53l0x_interrupt_threshold_settings.h -------------------------------------------------------------------------------- /software/prove/spark.adc: -------------------------------------------------------------------------------- 1 | pragma Partition_Elaboration_Policy (Sequential); 2 | 3 | -- Ignore warnings about absence of Global contract on runtime 4 | pragma Warnings (Off, "no Global contract available"); 5 | -------------------------------------------------------------------------------- /software/tests_database/common/gnattest_generated.ads: -------------------------------------------------------------------------------- 1 | package Gnattest_Generated is 2 | package GNATtest_Standard renames Standard; 3 | Default_Assert_Value : Boolean := False; 4 | end Gnattest_Generated; -------------------------------------------------------------------------------- /software/host/host.gpr: -------------------------------------------------------------------------------- 1 | project Host is 2 | 3 | for Main use ("main.adb"); 4 | 5 | package Compiler is 6 | for Switches ("ada") use ("-gnatwae", "-gnaty3IM79Sabcdefhiklnprstux", "-O"); 7 | end Compiler; 8 | 9 | end Host; 10 | 11 | -------------------------------------------------------------------------------- /software/test-ble/blink.gpr: -------------------------------------------------------------------------------- 1 | with "boards/stm32f405_mk1"; 2 | with "boards/stm32f405_mk1/config"; 3 | 4 | project blink is 5 | for Main use ("blink.adb"); 6 | for target use "arm-eabi"; 7 | for Runtime ("Ada") use Stm32f405_mk1'Runtime("Ada"); 8 | end blink; -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to O'PAVES 2 | 3 | Thank you for taking the time to contribute! 4 | 5 | If this is your first contribution, we invite you to read our [list of 6 | guidelines](https://github.com/AdaCore/contributing-howto), common to all 7 | AdaCore repositories. 8 | -------------------------------------------------------------------------------- /hardware/electronic/MK2/fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name OPAVES_Footprints)(type KiCad)(uri "$(KIPRJMOD)/../footprints.pretty")(options "")(descr "")) 3 | (lib (name crazyflie2-exp)(type KiCad)(uri "$(KIPRJMOD)/../crazyflie2-exp-template-electronics/ecad/libs")(options "")(descr "")) 4 | ) 5 | -------------------------------------------------------------------------------- /software/test-ble/ble.ads: -------------------------------------------------------------------------------- 1 | with Ada.Real_Time; use Ada.Real_Time; 2 | 3 | package BLE is 4 | procedure Init; 5 | 6 | type Speed_Msg_Type is record 7 | Speed : Natural; -- 0 .. 16#cccc# 8 | Timestamp : Time; 9 | end record; 10 | 11 | function Get_Speed return Speed_Msg_Type; 12 | end BLE; 13 | -------------------------------------------------------------------------------- /software/tests_database/gnattest_main_suite.ads: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with AUnit.Test_Suites; use AUnit.Test_Suites; 6 | 7 | package Gnattest_Main_Suite is 8 | 9 | function Suite return Access_Test_Suite; 10 | 11 | end Gnattest_Main_Suite; 12 | -- end read only 13 | -------------------------------------------------------------------------------- /software/tests_database/test_OPAVES_MkI.gpr: -------------------------------------------------------------------------------- 1 | with "aunit"; 2 | with "gnattest_common.gpr"; 3 | with "../OPAVES_MkI.gpr"; 4 | project test_OPAVES_MkI is 5 | 6 | for Source_Dirs use 7 | ("../obj/gnattest/tests", 8 | "common"); 9 | 10 | for Languages use Gnattest_Common'Languages & ("Ada"); 11 | package Compiler renames Gnattest_Common.Compiler; 12 | 13 | package Ide renames OPAVES_MkI.Ide; 14 | 15 | end test_OPAVES_MkI; 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Kicad 2 | *.000 3 | *.bak 4 | *.bck 5 | *.kicad_pcb-bak 6 | *~ 7 | 8 | # FreeCAD 9 | *.fcstd1 10 | 11 | # GNAT/GPS 12 | *.db 13 | *.ali 14 | *.o 15 | *.a 16 | *.xml 17 | *.cgpr 18 | *.bexch 19 | *.lexch 20 | *.a 21 | *.ci 22 | *.cswi 23 | *~ 24 | 25 | #Software 26 | software/obj 27 | software/board_support/obj 28 | software/board_support/vl53l0x/obj/ 29 | 30 | #GNATtest 31 | software/tests_database/*.stderr 32 | software/tests_database/*.stdout -------------------------------------------------------------------------------- /hardware/electronic/encoder/rev_B/gerber/encoder.TXT: -------------------------------------------------------------------------------- 1 | M48 2 | INCH,TZ 3 | T1C0.016 4 | T2C0.031 5 | T3C0.040 6 | T4C0.252 7 | % 8 | G90 9 | G05 10 | T1 11 | X48622Y-33543 12 | X48819Y-25118 13 | X50354Y-30512 14 | X50394Y-28661 15 | T2 16 | X47584Y-27466 17 | X47584Y-32770 18 | X48150Y-28031 19 | X48150Y-32205 20 | X48715Y-28597 21 | X48715Y-31639 22 | T3 23 | X52362Y-24772 24 | X52362Y-25772 25 | X52362Y-26772 26 | X52362Y-27772 27 | T4 28 | X46063Y-25984 29 | X46063Y-34252 30 | T0 31 | M30 32 | -------------------------------------------------------------------------------- /software/tests_database/databases-instantiations-test_data-tests-suite.ads: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with AUnit.Test_Suites; 6 | 7 | package Databases.Instantiations.Test_Data.Tests.Suite is 8 | 9 | function Suite return AUnit.Test_Suites.Access_Test_Suite; 10 | 11 | end Databases.Instantiations.Test_Data.Tests.Suite; 12 | -- end read only 13 | -------------------------------------------------------------------------------- /software/tests_database/databases-instantiations-test_data-tests-float_databases-test_data-tests-suite.ads: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with AUnit.Test_Suites; 6 | 7 | package Databases.Instantiations.Test_Data.Tests.Float_Databases.Test_Data.Tests.Suite is 8 | 9 | function Suite return AUnit.Test_Suites.Access_Test_Suite; 10 | 11 | end Databases.Instantiations.Test_Data.Tests.Float_Databases.Test_Data.Tests.Suite; 12 | -- end read only 13 | -------------------------------------------------------------------------------- /software/tests_database/databases-instantiations-test_data-tests-integer_databases-test_data-tests-suite.ads: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with AUnit.Test_Suites; 6 | 7 | package Databases.Instantiations.Test_Data.Tests.Integer_Databases.Test_Data.Tests.Suite is 8 | 9 | function Suite return AUnit.Test_Suites.Access_Test_Suite; 10 | 11 | end Databases.Instantiations.Test_Data.Tests.Integer_Databases.Test_Data.Tests.Suite; 12 | -- end read only 13 | -------------------------------------------------------------------------------- /software/tests_database/databases-instantiations-test_data-tests-float_databases-database_type_test_data-database_type_tests-suite.ads: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with AUnit.Test_Suites; 6 | 7 | package Databases.Instantiations.Test_Data.Tests.Float_Databases.Database_Type_Test_Data.Database_Type_Tests.Suite is 8 | 9 | function Suite return AUnit.Test_Suites.Access_Test_Suite; 10 | 11 | end Databases.Instantiations.Test_Data.Tests.Float_Databases.Database_Type_Test_Data.Database_Type_Tests.Suite; 12 | -- end read only 13 | -------------------------------------------------------------------------------- /software/tests_database/databases-instantiations-test_data-tests-integer_databases-database_type_test_data-database_type_tests-suite.ads: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with AUnit.Test_Suites; 6 | 7 | package Databases.Instantiations.Test_Data.Tests.Integer_Databases.Database_Type_Test_Data.Database_Type_Tests.Suite is 8 | 9 | function Suite return AUnit.Test_Suites.Access_Test_Suite; 10 | 11 | end Databases.Instantiations.Test_Data.Tests.Integer_Databases.Database_Type_Test_Data.Database_Type_Tests.Suite; 12 | -- end read only 13 | -------------------------------------------------------------------------------- /software/tests_database/test_runner.adb: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with AUnit.Reporter.gnattest; 6 | with AUnit.Run; 7 | with AUnit.Options; use AUnit.Options; 8 | with Gnattest_Main_Suite; use Gnattest_Main_Suite; 9 | 10 | procedure Test_Runner is 11 | procedure Runner is new AUnit.Run.Test_Runner (Suite); 12 | Reporter : AUnit.Reporter.gnattest.gnattest_Reporter; 13 | GT_Options : AUnit_Options := Default_Options; 14 | begin 15 | 16 | GT_Options.Report_Successes := True; 17 | 18 | Runner (Reporter, GT_Options); 19 | end Test_Runner; 20 | -- end read only 21 | -------------------------------------------------------------------------------- /software/tests_database/gnattest_common.gpr: -------------------------------------------------------------------------------- 1 | abstract project Gnattest_Common is 2 | for Languages use ("Ada"); 3 | for Source_Files use (); 4 | for Runtime ("Ada") use "ravenscar-full-stm32f4"; 5 | for Target use "arm-eabi"; 6 | 7 | package Builder is 8 | for Global_Configuration_Pragmas use "suppress.adc"; 9 | end Builder; 10 | 11 | package Linker is 12 | for Default_Switches ("ada") use ("-g"); 13 | end Linker; 14 | 15 | package Binder is 16 | for Default_Switches ("ada") use ("-E", "-static"); 17 | end Binder; 18 | 19 | package Compiler is 20 | for Default_Switches ("ada") use 21 | ("-g", "-gnatyM0", "-gnata"); 22 | end Compiler; 23 | 24 | end Gnattest_Common; 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # O'PAVES 2 | ## Open Platform for Autonomous VEhicle Systems 3 | 4 | O'PAVES aims at providing an open source/open hardware platform for the 5 | prototyping and development of autonomous vehicles. For the first step of this 6 | project, the goal is not to develop a fully autonomous car, but rather a 7 | framework that will open the field to a broader audience by tackling the 8 | electronic and real-time control software. 9 | 10 | --- 11 | 12 | Follow us on [Twitter](https://twitter.com/openpaves) or 13 | [Hackaday.io](https://hackaday.io/project/17555-opaves). 14 | 15 | --- 16 | 17 | ## How to build the O'PAVES car? 18 | Please follow the instructions [here](doc/build_instructions.md). 19 | 20 | ![O'PAVES Mk-I](doc/media/OPAVES_Mk-I.jpg) 21 | -------------------------------------------------------------------------------- /software/tests_database/test_driver.gpr: -------------------------------------------------------------------------------- 1 | with "test_OPAVES_MkI.gpr"; 2 | with "gnattest_common.gpr"; 3 | 4 | project Test_Driver is 5 | 6 | for Origin_Project use "../OPAVES_MkI.gpr"; 7 | 8 | for Target use Gnattest_Common'Target; 9 | 10 | for Runtime ("Ada") use Gnattest_Common'Runtime ("Ada"); 11 | 12 | for Languages use ("Ada"); 13 | for Main use ("test_runner.adb"); 14 | for Exec_Dir use "."; 15 | 16 | package Builder renames Gnattest_Common.Builder; 17 | package Linker renames Gnattest_Common.Linker; 18 | package Binder renames Gnattest_Common.Binder; 19 | package Compiler renames Gnattest_Common.Compiler; 20 | 21 | package Ide renames test_OPAVES_MkI.Ide; 22 | 23 | package GNATtest is 24 | for GNATTest_Mapping_File use "gnattest.xml"; 25 | end GNATtest; 26 | 27 | end Test_Driver; -------------------------------------------------------------------------------- /software/board_support/vl53l0x/vl53l0x.gpr: -------------------------------------------------------------------------------- 1 | with "../../Certyflie/Ada_Drivers_Library/arch/ARM/STM32/stm32f40x.gpr"; 2 | 3 | project VL53L0x is 4 | 5 | for Languages use ("C"); 6 | 7 | for Target use "arm-eabi"; 8 | for Runtime ("Ada") use "ravenscar-sfp-stm32f4"; 9 | 10 | for Source_Dirs use ("c_driver", "platform"); 11 | 12 | for Library_Name use "vl53l0x"; 13 | for Library_Kind use "static"; 14 | 15 | for Object_Dir use "obj"; 16 | for Library_Dir use "lib"; 17 | for Create_Missing_Dirs use "True"; 18 | 19 | package Builder is 20 | for Switches ("C") use ("-s"); 21 | end Builder; 22 | 23 | package Compiler is 24 | for Switches ("C") use 25 | ("-mlittle-endian", "-mhard-float", "-mthumb", 26 | "-mcpu=cortex-m4", "-mfpu=fpv4-sp-d16", "-g", "-O2"); 27 | end Compiler; 28 | 29 | end VL53L0x; 30 | -------------------------------------------------------------------------------- /hardware/electronic/encoder/rev_B/gerber/encoder.GBS: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Soldermask,Bot* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.4+dfsg1-stable) date Thu Jun 8 13:46:51 2017* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11R,2.232000X1.927200*% 11 | %ADD12O,2.232000X1.927200*% 12 | %ADD13C,6.600000*% 13 | %ADD14C,1.724000*% 14 | G04 APERTURE END LIST* 15 | D10* 16 | D11* 17 | X133000000Y-62920000D03* 18 | D12* 19 | X133000000Y-65460000D03* 20 | X133000000Y-68000000D03* 21 | X133000000Y-70540000D03* 22 | D13* 23 | X117000000Y-66000000D03* 24 | X117000000Y-87000000D03* 25 | D14* 26 | X122300000Y-71200000D03* 27 | X123736841Y-72636841D03* 28 | X120863159Y-69763159D03* 29 | X122300000Y-81800000D03* 30 | X120863159Y-83236841D03* 31 | X123736841Y-80363159D03* 32 | M02* 33 | -------------------------------------------------------------------------------- /hardware/electronic/encoder/rev_A/gerber/encoder-B.Mask.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Soldermask,Bot* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.4+dfsg1-stable) date Thu Feb 9 13:36:58 2017* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11R,2.432000X2.127200*% 11 | %ADD12O,2.432000X2.127200*% 12 | %ADD13C,6.800000*% 13 | %ADD14C,1.924000*% 14 | G04 APERTURE END LIST* 15 | D10* 16 | D11* 17 | X133000000Y-62920000D03* 18 | D12* 19 | X133000000Y-65460000D03* 20 | X133000000Y-68000000D03* 21 | X133000000Y-70540000D03* 22 | D13* 23 | X117000000Y-66000000D03* 24 | X117000000Y-87000000D03* 25 | D14* 26 | X125000000Y-84500000D03* 27 | X123203949Y-86296051D03* 28 | X126796051Y-82703949D03* 29 | X125000000Y-68500000D03* 30 | X126796051Y-70296051D03* 31 | X123203949Y-66703949D03* 32 | M02* 33 | -------------------------------------------------------------------------------- /software/prove/target.atp: -------------------------------------------------------------------------------- 1 | Bits_BE 0 2 | Bits_Per_Unit 8 3 | Bits_Per_Word 32 4 | Bytes_BE 0 5 | Char_Size 8 6 | Double_Float_Alignment 0 7 | Double_Scalar_Alignment 0 8 | Double_Size 64 9 | Float_Size 32 10 | Float_Words_BE 0 11 | Int_Size 32 12 | Long_Double_Size 64 13 | Long_Long_Size 64 14 | Long_Size 32 15 | Maximum_Alignment 8 16 | Max_Unaligned_Field 64 17 | Pointer_Size 32 18 | Short_Enums 1 19 | Short_Size 16 20 | Strict_Alignment 1 21 | System_Allocator_Alignment 8 22 | Wchar_T_Size 32 23 | Words_BE 0 24 | 25 | HF 3 I 16 16 26 | float 6 I 32 32 27 | double 15 I 64 64 28 | long double 15 I 64 64 29 | -------------------------------------------------------------------------------- /doc/hardware_design.md: -------------------------------------------------------------------------------- 1 | 2 | Here is an overview of the different components of the O'PAVES platform, what 3 | services they provuide and how they interact. 4 | 5 | - Micro-controller: This is the main component of the platform, it reads 6 | sensor data, receives commands from bluetooth and control the motor and 7 | steering servo. 8 | - Bluetooth module: Provides the remote control service via a smartphone 9 | application. 10 | - Inertial Measurement Unit (IMU): Provides acceleration and orientation data. 11 | - Range sensor: Measures the distance between the vehicle and an obstacle. 12 | - Battery: Provides electric power to the system. 13 | - Power supply: Provides a regulated voltage from the battery. 14 | - Motor control: Controls the motor throttle and direction based on the 15 | micro-controller commands. 16 | - Motor: Actuator to move the vehicle. 17 | - Steering servo: Actuator to move the steering wheels. 18 | 19 | ![](doc/media/OPAVES_hardware_overview.png) 20 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/Pololu_StepUp_Regulator.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Pololu_StepUp_Regulator (layer F.Cu) (tedit 5889EEA0) 2 | (fp_text reference 5V_Step_Up1 (at 2.54 -1.27) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value Pololu_StepUp_Regulator (at 8.89 -3.81) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start -1.905 -0.635) (end -1.905 8.255) (layer F.SilkS) (width 0.15)) 9 | (fp_line (start -1.905 8.255) (end 11.43 8.255) (layer F.SilkS) (width 0.15)) 10 | (fp_line (start 11.43 8.255) (end 11.43 -0.635) (layer F.SilkS) (width 0.15)) 11 | (fp_line (start 11.43 -0.635) (end -1.905 -0.635) (layer F.SilkS) (width 0.15)) 12 | (pad 1 thru_hole circle (at 0 6.35) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 13 | (pad 2 thru_hole rect (at 0 3.81) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 14 | (pad 3 thru_hole circle (at 0 1.27) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 15 | ) 16 | -------------------------------------------------------------------------------- /software/board_support/OPAVES_MkI_Board.gpr: -------------------------------------------------------------------------------- 1 | with "../Certyflie/Ada_Drivers_Library/boards/config"; 2 | with "../Certyflie/Ada_Drivers_Library/arch/ARM/STM32/stm32f40x"; 3 | with "../Certyflie/Ada_Drivers_Library/components/components"; 4 | with "../Certyflie/Ada_Drivers_Library/middleware/middleware"; 5 | with "../Certyflie/Ada_Drivers_Library/middleware/ravenscar_support"; 6 | with "vl53l0x/vl53l0x"; 7 | 8 | library project OPAVES_MkI_Board is 9 | 10 | RTS_Profile := "ravenscar-full"; 11 | 12 | for Target use "arm-eabi"; 13 | for Runtime ("Ada") use RTS_Profile & "-stm32f4"; 14 | 15 | Obj_Suffix := Project'Runtime ("Ada"); 16 | 17 | for Create_Missing_Dirs use "True"; 18 | for Library_Name use "OPAVES_Board"; 19 | for Library_Dir use "lib/" & Obj_Suffix; 20 | for Object_Dir use "obj/" & Obj_Suffix; 21 | 22 | for Source_Dirs use 23 | ("src"); 24 | 25 | package Builder is 26 | for Switches ("Ada") use ("-s"); 27 | end Builder; 28 | 29 | package Compiler renames Config.Compiler; 30 | 31 | end OPAVES_MkI_Board; 32 | -------------------------------------------------------------------------------- /software/coding_standard: -------------------------------------------------------------------------------- 1 | +RBoolean_Relational_Operators 2 | +RComplex_Inlined_Subprograms : 4 -- range [3 .. 10] 3 | +RDeep_Inheritance_Hierarchies : 2 -- range [-1 .. 10] 4 | +RDeeply_Nested_Generics : 2 -- range [1 .. 3] 5 | +RDeeply_Nested_Inlining : 3 -- range [3 .. 5] 6 | +RDirect_Calls_To_Primitives 7 | +RFloat_Equality_Checks 8 | +RGOTO_Statements 9 | +RImproper_Returns 10 | +RMetrics_Cyclomatic_Complexity : 5 -- range [5 .. 10] 11 | +RMisnamed_Controlling_Parameters 12 | +RMisnamed_Identifiers:Access_Suffix=_Access 13 | +RMisnamed_Identifiers:Class_Access_Suffix=_Class 14 | +RMisnamed_Identifiers:Class_Subtype_Suffix=_Class 15 | +RNon_Tagged_Derived_Types 16 | +ROverly_Nested_Control_Structures : 3 -- range [1 .. 10] 17 | +RPredefined_Numeric_Types 18 | +RRestrictions : No_Dependence => Ada.Containers 19 | +RToo_Many_Parents : 2 -- range [1 .. 4] 20 | +RUnassigned_OUT_Parameters 21 | +RUnconstrained_Array_Returns 22 | +RVisible_Components 23 | +RMetrics_LSLOC : 40 -- range [0 .. 10_000] 24 | +RNon_Qualified_Aggregates 25 | +RRaising_Predefined_Exceptions 26 | +RStyle_Checks : O 27 | -------------------------------------------------------------------------------- /software/test-ble/blink.adb: -------------------------------------------------------------------------------- 1 | with STM32.Board; use STM32.Board; 2 | with Ada.Real_Time; use Ada.Real_Time; 3 | with STM32.USARTs; use STM32.USARTs; 4 | with BLE; 5 | 6 | procedure Blink 7 | is 8 | Step : constant Time_Span := Milliseconds (50); 9 | Cycle : constant Time_Span := Milliseconds (500); 10 | T : Time; 11 | 12 | Msg : BLE.Speed_Msg_Type; 13 | Tog : Boolean := True; 14 | begin 15 | Initialize_LEDS; 16 | BLE.Init; 17 | 18 | T := Clock; 19 | loop 20 | delay until T; 21 | 22 | Msg := BLE.Get_Speed; 23 | 24 | if Msg.Timestamp + Cycle < T then 25 | -- Error: sensor data are too old 26 | Turn_On (Red_Led); 27 | Turn_On (Green_Led); 28 | T := T + Cycle; 29 | else 30 | -- Adjust cycle 31 | T := T + (15 - Msg.Speed / 2**12) * Step; 32 | 33 | Tog := not Tog; 34 | if Tog then 35 | Turn_On (Green_Led); 36 | Turn_Off (Red_Led); 37 | else 38 | Turn_Off (Green_Led); 39 | Turn_On (Red_Led); 40 | end if; 41 | end if; 42 | end loop; 43 | end Blink; 44 | -------------------------------------------------------------------------------- /hardware/electronic/encoder/rev_B/gerber/encoder.GTS: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Soldermask,Top* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.4+dfsg1-stable) date Thu Jun 8 13:46:51 2017* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11R,2.232000X1.927200*% 11 | %ADD12O,2.232000X1.927200*% 12 | %ADD13C,6.600000*% 13 | %ADD14R,1.700000X1.450000*% 14 | %ADD15R,1.700000X1.500000*% 15 | %ADD16C,1.724000*% 16 | G04 APERTURE END LIST* 17 | D10* 18 | D11* 19 | X133000000Y-62920000D03* 20 | D12* 21 | X133000000Y-65460000D03* 22 | X133000000Y-68000000D03* 23 | X133000000Y-70540000D03* 24 | D13* 25 | X117000000Y-66000000D03* 26 | X117000000Y-87000000D03* 27 | D14* 28 | X129750000Y-78700000D03* 29 | X132250000Y-78700000D03* 30 | D15* 31 | X129750000Y-76400000D03* 32 | X132450000Y-76400000D03* 33 | X129750000Y-74000000D03* 34 | X132450000Y-74000000D03* 35 | D16* 36 | X122300000Y-71200000D03* 37 | X123736841Y-72636841D03* 38 | X120863159Y-69763159D03* 39 | X122300000Y-81800000D03* 40 | X120863159Y-83236841D03* 41 | X123736841Y-80363159D03* 42 | M02* 43 | -------------------------------------------------------------------------------- /hardware/electronic/encoder/rev_B/gerber/encoder.GML: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Profile,NP* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.4+dfsg1-stable) date Thu Jun 8 13:46:51 2017* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11C,0.150000*% 11 | G04 APERTURE END LIST* 12 | D10* 13 | D11* 14 | X114250000Y-82250000D02* 15 | X112500000Y-84000000D01* 16 | X109000000Y-62500000D02* 17 | X110750000Y-60750000D01* 18 | X110750000Y-70750000D02* 19 | X109000000Y-69000000D01* 20 | X117000000Y-82250000D02* 21 | X114250000Y-82250000D01* 22 | X110750000Y-60750000D02* 23 | X135000000Y-60750000D01* 24 | X109000000Y-69000000D02* 25 | X109000000Y-62500000D01* 26 | X117000000Y-70750000D02* 27 | X110750000Y-70750000D01* 28 | X112500000Y-89750000D02* 29 | X118750000Y-89750000D01* 30 | X112500000Y-84000000D02* 31 | X112500000Y-89750000D01* 32 | X135000000Y-83750000D02* 33 | X118750000Y-89750000D01* 34 | X135000000Y-60750000D02* 35 | X135000000Y-83750000D01* 36 | X117000000Y-82250000D02* 37 | G75* 38 | G03X117000000Y-70750000I0J5750000D01* 39 | G01* 40 | M02* 41 | -------------------------------------------------------------------------------- /hardware/electronic/encoder/rev_A/gerber/encoder-Edge.Cuts.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Profile,NP* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.4+dfsg1-stable) date Thu Feb 9 13:36:58 2017* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11C,0.150000*% 11 | G04 APERTURE END LIST* 12 | D10* 13 | D11* 14 | X114250000Y-82250000D02* 15 | X112500000Y-84000000D01* 16 | X109000000Y-62500000D02* 17 | X110750000Y-60750000D01* 18 | X110750000Y-70750000D02* 19 | X109000000Y-69000000D01* 20 | X117000000Y-82250000D02* 21 | X114250000Y-82250000D01* 22 | X110750000Y-60750000D02* 23 | X135000000Y-60750000D01* 24 | X109000000Y-69000000D02* 25 | X109000000Y-62500000D01* 26 | X117000000Y-70750000D02* 27 | X110750000Y-70750000D01* 28 | X112500000Y-89750000D02* 29 | X118750000Y-89750000D01* 30 | X112500000Y-84000000D02* 31 | X112500000Y-89750000D01* 32 | X135000000Y-83750000D02* 33 | X118750000Y-89750000D01* 34 | X135000000Y-60750000D02* 35 | X135000000Y-83750000D01* 36 | X117000000Y-82250000D02* 37 | G75* 38 | G03X117000000Y-70750000I0J5750000D01* 39 | G01* 40 | M02* 41 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/Raspberry_Pi_B_Mounting_Holes.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Raspberry_Pi_B_Mounting_Holes (layer F.Cu) (tedit 5890DDF7) 2 | (fp_text reference REF** (at 0 -5.08) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value Raspberry_Pi_B_Mounting_Holes (at 3.81 -7.62) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start -3.5 -3.5) (end 81.5 -3.5) (layer F.SilkS) (width 0.15)) 9 | (fp_line (start 81.5 -3.5) (end 81.5 52.5) (layer F.SilkS) (width 0.15)) 10 | (fp_line (start 81.5 52.5) (end -3.5 52.5) (layer F.SilkS) (width 0.15)) 11 | (fp_line (start -3.5 52.5) (end -3.5 -3.5) (layer F.SilkS) (width 0.15)) 12 | (pad "" np_thru_hole circle (at 0 0) (size 2.75 2.75) (drill 2.75) (layers *.Cu *.Mask) 13 | (solder_mask_margin 1.175) (clearance 1.4)) 14 | (pad "" np_thru_hole circle (at 58 0) (size 2.75 2.75) (drill 2.75) (layers *.Cu *.Mask) 15 | (solder_mask_margin 1.175) (clearance 1.4)) 16 | (pad "" np_thru_hole circle (at 0 49) (size 2.75 2.75) (drill 2.75) (layers *.Cu *.Mask) 17 | (solder_mask_margin 1.175) (clearance 1.4)) 18 | (pad "" np_thru_hole circle (at 58 49) (size 2.75 2.75) (drill 2.75) (layers *.Cu *.Mask) 19 | (solder_mask_margin 1.175) (clearance 1.4)) 20 | ) 21 | -------------------------------------------------------------------------------- /software/tests_database/databases-instantiations-test_data-tests-float_databases-test_data-tests-suite.adb: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with AUnit.Test_Caller; 6 | with Gnattest_Generated; 7 | 8 | package body Databases.Instantiations.Test_Data.Tests.Float_Databases.Test_Data.Tests.Suite is 9 | 10 | package Runner_1 is new AUnit.Test_Caller 11 | (GNATtest_Generated.GNATtest_Standard.Databases.Instantiations.Test_Data.Tests.Float_Databases.Test_Data.Tests.Test); 12 | 13 | Result : aliased AUnit.Test_Suites.Test_Suite; 14 | 15 | Case_1_1_Test_Get_Database_Instance_e71beb : aliased Runner_1.Test_Case; 16 | 17 | function Suite return AUnit.Test_Suites.Access_Test_Suite is 18 | begin 19 | 20 | Runner_1.Create 21 | (Case_1_1_Test_Get_Database_Instance_e71beb, 22 | "databases-generics.ads:40:4 instance at databases-instantiations.ads:43:4:", 23 | Test_Get_Database_Instance_e71beb'Access); 24 | 25 | Result.Add_Test (Case_1_1_Test_Get_Database_Instance_e71beb'Access); 26 | 27 | return Result'Access; 28 | 29 | end Suite; 30 | 31 | end Databases.Instantiations.Test_Data.Tests.Float_Databases.Test_Data.Tests.Suite; 32 | -- end read only 33 | -------------------------------------------------------------------------------- /software/tests_database/databases-instantiations-test_data-tests-integer_databases-test_data-tests-suite.adb: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with AUnit.Test_Caller; 6 | with Gnattest_Generated; 7 | 8 | package body Databases.Instantiations.Test_Data.Tests.Integer_Databases.Test_Data.Tests.Suite is 9 | 10 | package Runner_1 is new AUnit.Test_Caller 11 | (GNATtest_Generated.GNATtest_Standard.Databases.Instantiations.Test_Data.Tests.Integer_Databases.Test_Data.Tests.Test); 12 | 13 | Result : aliased AUnit.Test_Suites.Test_Suite; 14 | 15 | Case_1_1_Test_Get_Database_Instance_e71beb : aliased Runner_1.Test_Case; 16 | 17 | function Suite return AUnit.Test_Suites.Access_Test_Suite is 18 | begin 19 | 20 | Runner_1.Create 21 | (Case_1_1_Test_Get_Database_Instance_e71beb, 22 | "databases-generics.ads:40:4 instance at databases-instantiations.ads:38:4:", 23 | Test_Get_Database_Instance_e71beb'Access); 24 | 25 | Result.Add_Test (Case_1_1_Test_Get_Database_Instance_e71beb'Access); 26 | 27 | return Result'Access; 28 | 29 | end Suite; 30 | 31 | end Databases.Instantiations.Test_Data.Tests.Integer_Databases.Test_Data.Tests.Suite; 32 | -- end read only 33 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/DP3T_switch.kicad_mod: -------------------------------------------------------------------------------- 1 | (module DP3T_switch (layer F.Cu) (tedit 58DA6674) 2 | (fp_text reference REF** (at 0 0.5) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value DP3T_switch (at 0 -0.5) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start 10.414 0) (end -5.842 0) (layer F.SilkS) (width 0.15)) 9 | (fp_line (start 10.414 10.16) (end 10.414 0) (layer F.SilkS) (width 0.15)) 10 | (fp_line (start -5.842 10.16) (end 10.414 10.16) (layer F.SilkS) (width 0.15)) 11 | (fp_line (start -5.842 0) (end -5.842 10.16) (layer F.SilkS) (width 0.15)) 12 | (pad 1 thru_hole circle (at -2.54 2.54) (size 2 2) (drill 1.1) (layers *.Cu *.Mask)) 13 | (pad 2 thru_hole circle (at 0.66 2.54) (size 2 2) (drill 1.1) (layers *.Cu *.Mask)) 14 | (pad 3 thru_hole circle (at 3.86 2.54) (size 2 2) (drill 1.1) (layers *.Cu *.Mask)) 15 | (pad 4 thru_hole circle (at 7.06 2.54) (size 2 2) (drill 1.1) (layers *.Cu *.Mask)) 16 | (pad 5 thru_hole circle (at -2.54 7.54) (size 2 2) (drill 1.1) (layers *.Cu *.Mask)) 17 | (pad 6 thru_hole circle (at 0.66 7.54) (size 2 2) (drill 1.1) (layers *.Cu *.Mask)) 18 | (pad 7 thru_hole circle (at 3.86 7.54) (size 2 2) (drill 1.1) (layers *.Cu *.Mask)) 19 | (pad 8 thru_hole circle (at 7.06 7.54) (size 2 2) (drill 1.1) (layers *.Cu *.Mask)) 20 | ) 21 | -------------------------------------------------------------------------------- /software/tests_database/databases-instantiations-test_data-tests-suite.adb: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with AUnit.Test_Caller; 6 | with Gnattest_Generated; 7 | 8 | package body Databases.Instantiations.Test_Data.Tests.Suite is 9 | 10 | package Runner_1 is new AUnit.Test_Caller 11 | (GNATtest_Generated.GNATtest_Standard.Databases.Instantiations.Test_Data.Tests.Test); 12 | 13 | Result : aliased AUnit.Test_Suites.Test_Suite; 14 | 15 | Case_1_1_Test_Set_Raw_Data_10fee9 : aliased Runner_1.Test_Case; 16 | Case_2_1_Test_Get_Raw_Data_2e7f87 : aliased Runner_1.Test_Case; 17 | 18 | function Suite return AUnit.Test_Suites.Access_Test_Suite is 19 | begin 20 | 21 | Runner_1.Create 22 | (Case_1_1_Test_Set_Raw_Data_10fee9, 23 | "databases-instantiations.ads:23:4:", 24 | Test_Set_Raw_Data_10fee9'Access); 25 | Runner_1.Create 26 | (Case_2_1_Test_Get_Raw_Data_2e7f87, 27 | "databases-instantiations.ads:29:4:", 28 | Test_Get_Raw_Data_2e7f87'Access); 29 | 30 | Result.Add_Test (Case_1_1_Test_Set_Raw_Data_10fee9'Access); 31 | Result.Add_Test (Case_2_1_Test_Get_Raw_Data_2e7f87'Access); 32 | 33 | return Result'Access; 34 | 35 | end Suite; 36 | 37 | end Databases.Instantiations.Test_Data.Tests.Suite; 38 | -- end read only 39 | -------------------------------------------------------------------------------- /software/board_support/src/board.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | package Board is 20 | end Board; 21 | -------------------------------------------------------------------------------- /software/src/opaves-comm.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | package OPAVES.Comm is 20 | 21 | end OPAVES.Comm; 22 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/Pololu_StepUp_StepDown_Regulator.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Pololu_StepUp_StepDown_Regulator (layer F.Cu) (tedit 5889FDB5) 2 | (fp_text reference REF** (at 0 -1.27) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value Pololu_StepUp_StepDown_Regulator (at 0 -3.81) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start -2.54 0) (end -2.54 12.7) (layer F.SilkS) (width 0.15)) 9 | (fp_line (start -2.54 12.7) (end 15.24 12.7) (layer F.SilkS) (width 0.15)) 10 | (fp_line (start 15.24 12.7) (end 15.24 0) (layer F.SilkS) (width 0.15)) 11 | (fp_line (start 15.24 0) (end -2.54 0) (layer F.SilkS) (width 0.15)) 12 | (fp_text user SHDN (at 5.08 10.16) (layer F.SilkS) 13 | (effects (font (size 1 1) (thickness 0.15))) 14 | ) 15 | (fp_text user VIN (at 5.08 7.62) (layer F.SilkS) 16 | (effects (font (size 1 1) (thickness 0.15))) 17 | ) 18 | (fp_text user GND (at 5.08 5.08) (layer F.SilkS) 19 | (effects (font (size 1 1) (thickness 0.15))) 20 | ) 21 | (fp_text user VOUT (at 5.08 2.54) (layer F.SilkS) 22 | (effects (font (size 1 1) (thickness 0.15))) 23 | ) 24 | (pad 1 thru_hole circle (at 0 2.54) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 25 | (pad 2 thru_hole rect (at 0 5.08) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 26 | (pad 3 thru_hole circle (at 0 7.62) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 27 | (pad 4 thru_hole circle (at 0 10.16) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 28 | ) 29 | -------------------------------------------------------------------------------- /software/src/opaves-comm-serial.ads: -------------------------------------------------------------------------------- 1 | 2 | ------------------------------------------------------------------------------ 3 | -- -- 4 | -- O'PAVES -- 5 | -- -- 6 | -- Copyright (C) 2017, AdaCore -- 7 | -- -- 8 | -- This program is free software; you can redistribute it and/or modify it -- 9 | -- under terms of the GNU General Public License as published by the Free -- 10 | -- Software Foundation; either version 3, or (at your option) any later -- 11 | -- version. This software is distributed in the hope that it will be useful -- 12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 13 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 14 | -- License for more details. You should have received a copy of the GNU -- 15 | -- General Public License distributed with this software; see file -- 16 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 17 | -- of the license. -- 18 | ------------------------------------------------------------------------------ 19 | 20 | package OPAVES.Comm.Serial is 21 | 22 | task Communication_Task 23 | with Priority => Serial_Comm_Task_Priority; 24 | 25 | end OPAVES.Comm.Serial; 26 | -------------------------------------------------------------------------------- /software/tests_database/gnattest_main_suite.adb: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with Databases.Instantiations.Test_Data.Tests.Suite; 6 | with Databases.Instantiations.Test_Data.Tests.Float_Databases.Database_Type_Test_Data.Database_Type_Tests.Suite; 7 | with Databases.Instantiations.Test_Data.Tests.Float_Databases.Test_Data.Tests.Suite; 8 | with Databases.Instantiations.Test_Data.Tests.Integer_Databases.Database_Type_Test_Data.Database_Type_Tests.Suite; 9 | with Databases.Instantiations.Test_Data.Tests.Integer_Databases.Test_Data.Tests.Suite; 10 | 11 | package body Gnattest_Main_Suite is 12 | 13 | Result : aliased AUnit.Test_Suites.Test_Suite; 14 | 15 | function Suite return AUnit.Test_Suites.Access_Test_Suite is 16 | begin 17 | 18 | Result.Add_Test (Databases.Instantiations.Test_Data.Tests.Suite.Suite); 19 | Result.Add_Test (Databases.Instantiations.Test_Data.Tests.Float_Databases.Database_Type_Test_Data.Database_Type_Tests.Suite.Suite); 20 | Result.Add_Test (Databases.Instantiations.Test_Data.Tests.Float_Databases.Test_Data.Tests.Suite.Suite); 21 | Result.Add_Test (Databases.Instantiations.Test_Data.Tests.Integer_Databases.Database_Type_Test_Data.Database_Type_Tests.Suite.Suite); 22 | Result.Add_Test (Databases.Instantiations.Test_Data.Tests.Integer_Databases.Test_Data.Tests.Suite.Suite); 23 | 24 | return Result'Access; 25 | 26 | end Suite; 27 | 28 | end Gnattest_Main_Suite; 29 | -- end read only 30 | -------------------------------------------------------------------------------- /software/host/opaves_host.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | package Opaves_Host is 20 | procedure Init (Comm : String); 21 | 22 | procedure Ping (In_Msg : String; 23 | Out_Msg : out String; 24 | Out_Len : out Natural); 25 | 26 | end Opaves_Host; 27 | -------------------------------------------------------------------------------- /software/src/last_chance_handler.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with System; 20 | 21 | package Last_Chance_Handler is 22 | 23 | procedure Last_Chance_Handler (Msg : System.Address; Line : Integer); 24 | pragma Export (C, Last_Chance_Handler, "__gnat_last_chance_handler"); 25 | pragma No_Return (Last_Chance_Handler); 26 | 27 | end Last_Chance_Handler; 28 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/Steering_Assembly.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Steering_Assembly (layer F.Cu) (tedit 588B6E2A) 2 | (fp_text reference REF** (at -2.794 -5.7658) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value Steering_Assembly (at 0.6604 -4.0894) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start 0 -13) (end 0 -3) (layer F.SilkS) (width 0.15)) 9 | (fp_line (start 30 -13) (end 0 -13) (layer F.SilkS) (width 0.15)) 10 | (fp_line (start 30 -3) (end 30 -13) (layer F.SilkS) (width 0.15)) 11 | (fp_line (start 13 4) (end 17 4) (layer Margin) (width 0.15)) 12 | (fp_line (start 15 14) (end 54 8) (layer F.SilkS) (width 0.15)) 13 | (fp_line (start 54 0) (end 15 -6) (layer F.SilkS) (width 0.15)) 14 | (fp_arc (start 54 4) (end 54 0) (angle 180) (layer F.SilkS) (width 0.15)) 15 | (fp_line (start -24 8) (end 15 14) (layer F.SilkS) (width 0.15)) 16 | (fp_line (start -24 0) (end 15 -6) (layer F.SilkS) (width 0.15)) 17 | (fp_arc (start -24 4) (end -24 8) (angle 180) (layer F.SilkS) (width 0.15)) 18 | (fp_line (start 15 -6) (end 15 14) (layer Margin) (width 0.15)) 19 | (pad "" np_thru_hole circle (at 0 0) (size 3.4 3.4) (drill 3.4) (layers *.Cu *.Mask) 20 | (solder_mask_margin 0.1) (clearance 0.5)) 21 | (pad 2 np_thru_hole circle (at 0 8) (size 3.4 3.4) (drill 3.4) (layers *.Cu *.Mask) 22 | (solder_mask_margin 0.1) (clearance 0.5)) 23 | (pad 3 np_thru_hole circle (at 30 0) (size 3.4 3.4) (drill 3.4) (layers *.Cu *.Mask) 24 | (solder_mask_margin 0.1) (clearance 0.5)) 25 | (pad 4 np_thru_hole circle (at 30 8) (size 3.4 3.4) (drill 3.4) (layers *.Cu *.Mask) 26 | (solder_mask_margin 0.1) (clearance 0.5)) 27 | ) 28 | -------------------------------------------------------------------------------- /software/src/opaves.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with System; use System; 20 | 21 | package OPAVES with SPARK_Mode is 22 | 23 | CRTP_Task_Priority : constant Priority := Default_Priority + 1; 24 | Syslink_Task_Priority : constant Priority := Default_Priority + 2; 25 | Serial_Comm_Task_Priority : constant Priority := Default_Priority; 26 | 27 | end OPAVES; 28 | -------------------------------------------------------------------------------- /software/src/opaves-comm-crtp.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with CRTP; use CRTP; 20 | with Syslink; use Syslink; 21 | 22 | package OPAVES.Comm.CRTP is 23 | 24 | CRTP_Rx_Task : CRTP_Rx_Task_Type (CRTP_Task_Priority); 25 | CRTP_Tx_Task : CRTP_Tx_Task_Type (CRTP_Task_Priority); 26 | 27 | Syslink_Task : Syslink_Task_Type (Syslink_Task_Priority); 28 | 29 | procedure Initialize; 30 | 31 | end OPAVES.Comm.CRTP; 32 | -------------------------------------------------------------------------------- /hardware/electronic/MK2/rev_A/gerber/MK2.GML: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Profile,NP* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.4+dfsg1-stable) date Thu Aug 10 19:21:35 2017* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.150000*% 10 | G04 APERTURE END LIST* 11 | D10* 12 | X246250000Y-115500000D02* 13 | X246250000Y-105500000D01* 14 | X226250000Y-115500000D02* 15 | X246250000Y-115500000D01* 16 | X226250000Y-105500000D02* 17 | X226250000Y-115500000D01* 18 | X246250000Y-105500000D02* 19 | X226250000Y-105500000D01* 20 | X268500000Y-66500000D02* 21 | X221200000Y-66500000D01* 22 | X268500000Y-126500000D02* 23 | X221200000Y-126500000D01* 24 | X273500000Y-121500000D02* 25 | X273500000Y-71500000D01* 26 | X268500000Y-66500000D02* 27 | X273500000Y-71500000D01* 28 | X273500000Y-121500000D02* 29 | X268500000Y-126500000D01* 30 | X42600000Y-76500000D02* 31 | X37600000Y-81500000D01* 32 | X42600000Y-116500000D02* 33 | X37600000Y-111500000D01* 34 | X96250000Y-76500000D02* 35 | X42600000Y-76500000D01* 36 | X101250000Y-71500000D02* 37 | X96250000Y-76500000D01* 38 | X101250000Y-56500000D02* 39 | X101250000Y-71500000D01* 40 | X96250000Y-116500000D02* 41 | X42600000Y-116500000D01* 42 | X101250000Y-121500000D02* 43 | X96250000Y-116500000D01* 44 | X101250000Y-136500000D02* 45 | X101250000Y-121500000D01* 46 | X106250000Y-141500000D02* 47 | X101250000Y-136500000D01* 48 | X106250000Y-51500000D02* 49 | X101250000Y-56500000D01* 50 | X206250000Y-141500000D02* 51 | X221200000Y-126500000D01* 52 | X206250000Y-51500000D02* 53 | X221200000Y-66500000D01* 54 | X106250000Y-141500000D02* 55 | X206250000Y-141500000D01* 56 | X106250000Y-51500000D02* 57 | X206250000Y-51500000D01* 58 | X37600000Y-81500000D02* 59 | X37600000Y-111500000D01* 60 | M02* 61 | -------------------------------------------------------------------------------- /software/src/opaves-ble.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with Ada.Real_Time; use Ada.Real_Time; 20 | 21 | package OPAVES.BLE is 22 | procedure Initialize; 23 | 24 | type Remote_Command_Data is record 25 | Speed : Integer; -- -100 .. 100 26 | Steering : Integer; -- -100 .. 100 27 | Timestamp : Time; 28 | end record; 29 | 30 | function Last_Command return Remote_Command_Data; 31 | end OPAVES.BLE; 32 | -------------------------------------------------------------------------------- /software/board_support/src/board-ble.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with STM32.Device; 20 | with STM32.USARTs; 21 | with Ada.Interrupts.Names; use Ada.Interrupts; 22 | 23 | package Board.BLE is 24 | 25 | BLE_UART_Interrupt_Id : constant Interrupt_ID := 26 | Ada.Interrupts.Names.USART3_Interrupt; 27 | BLE_UART : STM32.USARTs.USART renames STM32.Device.USART_3; 28 | 29 | procedure Initialize_BLE_UART; 30 | end Board.BLE; 31 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/DRV5013_Hall_Sensor_TO-92_Inline.kicad_mod: -------------------------------------------------------------------------------- 1 | (module DRV5013_Hall_Sensor_TO-92_Inline (layer F.Cu) (tedit 589C65F5) 2 | (descr "TO-92 leads in-line, wide, drill 0.8mm (see NXP sot054_po.pdf)") 3 | (tags "to-92 sc-43 sc-43a sot54 PA33 transistor") 4 | (fp_text reference TO-92-A1 (at 0 -4) (layer F.SilkS) hide 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value Digital_Latch_Hall_Effect_Sensor_TO-92 (at 0 3) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start 0.508 -1.27) (end 0.508 -1.016) (layer F.SilkS) (width 0.15)) 11 | (fp_line (start 4.572 -1.27) (end 0.508 -1.27) (layer F.SilkS) (width 0.15)) 12 | (fp_line (start 4.572 -1.016) (end 4.572 -1.27) (layer F.SilkS) (width 0.15)) 13 | (fp_line (start 1.27 1.524) (end 0.508 1.016) (layer F.SilkS) (width 0.15)) 14 | (fp_line (start 3.81 1.524) (end 1.27 1.524) (layer F.SilkS) (width 0.15)) 15 | (fp_line (start 4.572 1.016) (end 3.81 1.524) (layer F.SilkS) (width 0.15)) 16 | (fp_line (start -1 1.95) (end -1 -2.65) (layer F.CrtYd) (width 0.05)) 17 | (fp_line (start -1 1.95) (end 6.1 1.95) (layer F.CrtYd) (width 0.05)) 18 | (fp_line (start -1 -2.65) (end 6.1 -2.65) (layer F.CrtYd) (width 0.05)) 19 | (fp_line (start 6.1 1.95) (end 6.1 -2.65) (layer F.CrtYd) (width 0.05)) 20 | (pad 2 thru_hole circle (at 2.54 0 90) (size 1.524 1.524) (drill 0.8) (layers *.Cu *.Mask F.SilkS)) 21 | (pad 3 thru_hole circle (at 4.572 0 90) (size 1.524 1.524) (drill 0.8) (layers *.Cu *.Mask F.SilkS)) 22 | (pad 1 thru_hole circle (at 0.508 0 90) (size 1.524 1.524) (drill 0.8) (layers *.Cu *.Mask F.SilkS)) 23 | (model TO_SOT_Packages_THT.3dshapes/TO-92_Inline_Wide.wrl 24 | (at (xyz 0.1 0 0)) 25 | (scale (xyz 1 1 1)) 26 | (rotate (xyz 0 0 -90)) 27 | ) 28 | ) 29 | -------------------------------------------------------------------------------- /hardware/electronic/MK1/rev_A/gerber/MK1.GML: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Profile,NP* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.4+dfsg1-stable) date Fri Feb 3 16:23:24 2017* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11C,0.150000*% 11 | G04 APERTURE END LIST* 12 | D10* 13 | D11* 14 | X246250000Y-115500000D02* 15 | X246250000Y-105500000D01* 16 | X226250000Y-115500000D02* 17 | X246250000Y-115500000D01* 18 | X226250000Y-105500000D02* 19 | X226250000Y-115500000D01* 20 | X246250000Y-105500000D02* 21 | X226250000Y-105500000D01* 22 | X268500000Y-66500000D02* 23 | X221200000Y-66500000D01* 24 | X268500000Y-126500000D02* 25 | X221200000Y-126500000D01* 26 | X273500000Y-121500000D02* 27 | X273500000Y-71500000D01* 28 | X268500000Y-66500000D02* 29 | X273500000Y-71500000D01* 30 | X273500000Y-121500000D02* 31 | X268500000Y-126500000D01* 32 | X42600000Y-76500000D02* 33 | X37600000Y-81500000D01* 34 | X42600000Y-116500000D02* 35 | X37600000Y-111500000D01* 36 | X96250000Y-76500000D02* 37 | X42600000Y-76500000D01* 38 | X101250000Y-71500000D02* 39 | X96250000Y-76500000D01* 40 | X101250000Y-56500000D02* 41 | X101250000Y-71500000D01* 42 | X96250000Y-116500000D02* 43 | X42600000Y-116500000D01* 44 | X101250000Y-121500000D02* 45 | X96250000Y-116500000D01* 46 | X101250000Y-136500000D02* 47 | X101250000Y-121500000D01* 48 | X106250000Y-141500000D02* 49 | X101250000Y-136500000D01* 50 | X106250000Y-51500000D02* 51 | X101250000Y-56500000D01* 52 | X206250000Y-141500000D02* 53 | X221200000Y-126500000D01* 54 | X206250000Y-51500000D02* 55 | X221200000Y-66500000D01* 56 | X106250000Y-141500000D02* 57 | X206250000Y-141500000D01* 58 | X106250000Y-51500000D02* 59 | X206250000Y-51500000D01* 60 | X37600000Y-81500000D02* 61 | X37600000Y-111500000D01* 62 | M02* 63 | -------------------------------------------------------------------------------- /hardware/electronic/MK1/rev_B/gerber/MK1.GML: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Profile,NP* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.4+dfsg1-stable) date Thu Jun 8 13:27:36 2017* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11C,0.150000*% 11 | G04 APERTURE END LIST* 12 | D10* 13 | D11* 14 | X246250000Y-115500000D02* 15 | X246250000Y-105500000D01* 16 | X226250000Y-115500000D02* 17 | X246250000Y-115500000D01* 18 | X226250000Y-105500000D02* 19 | X226250000Y-115500000D01* 20 | X246250000Y-105500000D02* 21 | X226250000Y-105500000D01* 22 | X268500000Y-66500000D02* 23 | X221200000Y-66500000D01* 24 | X268500000Y-126500000D02* 25 | X221200000Y-126500000D01* 26 | X273500000Y-121500000D02* 27 | X273500000Y-71500000D01* 28 | X268500000Y-66500000D02* 29 | X273500000Y-71500000D01* 30 | X273500000Y-121500000D02* 31 | X268500000Y-126500000D01* 32 | X42600000Y-76500000D02* 33 | X37600000Y-81500000D01* 34 | X42600000Y-116500000D02* 35 | X37600000Y-111500000D01* 36 | X96250000Y-76500000D02* 37 | X42600000Y-76500000D01* 38 | X101250000Y-71500000D02* 39 | X96250000Y-76500000D01* 40 | X101250000Y-56500000D02* 41 | X101250000Y-71500000D01* 42 | X96250000Y-116500000D02* 43 | X42600000Y-116500000D01* 44 | X101250000Y-121500000D02* 45 | X96250000Y-116500000D01* 46 | X101250000Y-136500000D02* 47 | X101250000Y-121500000D01* 48 | X106250000Y-141500000D02* 49 | X101250000Y-136500000D01* 50 | X106250000Y-51500000D02* 51 | X101250000Y-56500000D01* 52 | X206250000Y-141500000D02* 53 | X221200000Y-126500000D01* 54 | X206250000Y-51500000D02* 55 | X221200000Y-66500000D01* 56 | X106250000Y-141500000D02* 57 | X206250000Y-141500000D01* 58 | X106250000Y-51500000D02* 59 | X206250000Y-51500000D01* 60 | X37600000Y-81500000D02* 61 | X37600000Y-111500000D01* 62 | M02* 63 | -------------------------------------------------------------------------------- /software/src/opaves-commander.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | 20 | with Board.Steering; use Board.Steering; 21 | with Board.Motor; use Board.Motor; 22 | 23 | package OPAVES.Commander is 24 | 25 | procedure Initialize; 26 | -- Initialize the commander module 27 | 28 | function Get_Throttle_Command return Throttle; 29 | function Get_Steering_Command return Steering_Value; 30 | -- Getters for the received commands 31 | 32 | end OPAVES.Commander; 33 | -------------------------------------------------------------------------------- /software/board_support/vl53l0x/c_driver/vl53l0x_platform_log.c: -------------------------------------------------------------------------------- 1 | /* 2 | * COPYRIGHT (C) STMicroelectronics 2015. All rights reserved. 3 | * 4 | * This software is the confidential and proprietary information of 5 | * STMicroelectronics ("Confidential Information"). You shall not 6 | * disclose such Confidential Information and shall use it only in 7 | * accordance with the terms of the license agreement you entered into 8 | * with STMicroelectronics 9 | * 10 | * Programming Golden Rule: Keep it Simple! 11 | * 12 | */ 13 | 14 | /*! 15 | * \file VL53L0X_platform_log.c 16 | * \brief Code function defintions for Ewok Platform Layer 17 | * 18 | */ 19 | 20 | 21 | #include // sprintf(), vsnprintf(), printf() 22 | #include // sprintf(), vsnprintf(), printf() 23 | #ifdef _MSC_VER 24 | #define snprintf _snprintf 25 | #endif 26 | 27 | #include "vl53l0x_def.h" 28 | #include "vl53l0x_platform_log.h" 29 | 30 | 31 | uint32_t _trace_level = TRACE_LEVEL_WARNING; 32 | uint32_t _trace_modules = TRACE_MODULE_NONE; 33 | uint32_t _trace_functions = TRACE_FUNCTION_NONE; 34 | 35 | #if defined(VL53L0X_LOG_ENABLE) && (TRACE_UART==1) 36 | int32_t VL53L0X_trace_config(char *filename, uint32_t modules, uint32_t level, uint32_t functions) 37 | { 38 | int STATUS = 0; 39 | 40 | _trace_functions = functions; 41 | _trace_level = level; 42 | _trace_modules = modules; 43 | 44 | return STATUS; 45 | } 46 | 47 | 48 | void trace_print_module_function(uint32_t module, uint32_t level, uint32_t function, const char *format, ...) 49 | { 50 | if ( ((level <=_trace_level) && ((module & _trace_modules) > 0)) 51 | || ((function & _trace_functions) > 0) ) 52 | { 53 | va_list arg_list; 54 | va_start(arg_list, format); 55 | trace_vprintf( format, arg_list); 56 | va_end(arg_list); 57 | } 58 | } 59 | #endif 60 | -------------------------------------------------------------------------------- /software/src/sensors.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | package Sensors is 20 | 21 | IMU_Read_Frequency : constant := 100; 22 | -- Read the IMU at 100Hz 23 | 24 | task Sensors_Task; 25 | 26 | procedure Initialize 27 | with Post => Sensors_Initialized; 28 | 29 | function Sensors_Initialized return Boolean; 30 | 31 | private 32 | 33 | type On_Board_Sensors is 34 | (Ranging_Front_Left, 35 | Ranging_Front_Center, 36 | Ranging_Front_Right, 37 | Ranging_Side_Right, 38 | Ranging_Rear, 39 | IMU, 40 | VBat); 41 | 42 | end Sensors; 43 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | # Appveyor continuous builder configuration 2 | 3 | # Version format, we don't have version number for O'PAVES yet 4 | version: 0.0.{build} 5 | 6 | # Setup python for build and test-suite scripts 7 | environment: 8 | PYTHON: C:\\Python27 9 | 10 | # Cache directories will be preseved from one build to the other 11 | cache: 12 | - C:\OPAVES_tools\ 13 | 14 | install: 15 | 16 | # Get the submodules 17 | - cmd: git submodule init 18 | - cmd: git submodule update --recursive 19 | 20 | 21 | # Define environment variables 22 | - ps: $env:TOOLS_DIR = "C:\OPAVES_tools\" 23 | - ps: $env:GNAT_ARM_ELF_INSTALLER = $env:TOOLS_DIR + "gnat-gpl-2016-arm-elf-windows-bin.exe" 24 | 25 | # Show current dir and its content 26 | - cmd: cd 27 | - cmd: dir 28 | 29 | # Create the tool dir if it doesn't exists 30 | - ps: md -f $env:TOOLS_DIR 31 | 32 | # Show content of tool dir 33 | - ps: dir $env:TOOLS_DIR 34 | 35 | # Download compiler installer if not already in the tool dir 36 | - ps: If (Test-Path $env:GNAT_ARM_ELF_INSTALLER){echo compiler already in cache}Else{(new-object net.webclient).DownloadFile('http://mirrors.cdn.adacore.com/art/5742ee65a3f5d77ed752e1ad', $env:GNAT_ARM_ELF_INSTALLER)} 37 | 38 | # Show content of tool dir again so we can see if the download was ok 39 | - ps: dir $env:TOOLS_DIR 40 | 41 | # Install the compiler 42 | - cmd: cmd /c start /wait %GNAT_ARM_ELF_INSTALLER% /S /D=%TOOLS_DIR% 43 | 44 | # Show content of tool dir again so we can see if install was ok 45 | - ps: dir $env:TOOLS_DIR 46 | 47 | # Add compiler to the PATH 48 | - ps: $env:Path += ";" + $env:TOOLS_DIR +"bin" 49 | 50 | # Check that we can run the compiler (also display the version) 51 | - ps: arm-eabi-gnatls -v 52 | 53 | # We don't use the build section 54 | build: off 55 | 56 | # Build the main application 57 | test_script: 58 | - cmd: gprbuild -j0 -p -P software/OPAVES_MkI.gpr -XPLATFORM_BUILD=Production 59 | - cmd: gprbuild -j0 -p -P software/OPAVES_MkI.gpr -XPLATFORM_BUILD=Debug 60 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/Pololu_VL53L0x_Carrier.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Pololu_VL53L0x_Carrier (layer F.Cu) (tedit 588A3F86) 2 | (fp_text reference REF** (at 0 -2.5) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value Pololu_VL53L0x_Carrier (at 0 -4) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start 2.5 7.6) (end 32.5 14.3) (layer Dwgs.User) (width 0.15)) 9 | (fp_line (start 2.5 7.6) (end 32.5 0.9) (layer Dwgs.User) (width 0.15)) 10 | (fp_line (start 32.5 17.1) (end 32.5 7.6) (layer Dwgs.User) (width 0.15)) 11 | (fp_line (start 2.5 7.6) (end 32.5 17.1) (layer Dwgs.User) (width 0.15)) 12 | (fp_line (start 32.5 -1.9) (end 2.5 7.6) (layer Dwgs.User) (width 0.15)) 13 | (fp_line (start 32.5 7.6) (end 32.5 -1.9) (layer Dwgs.User) (width 0.15)) 14 | (fp_line (start 1.5 -1.5) (end 1.5 16.5) (layer F.SilkS) (width 0.15)) 15 | (fp_line (start -1.5 -1.5) (end 1.5 -1.5) (layer F.SilkS) (width 0.15)) 16 | (fp_line (start 2.5 -1.5) (end -1.5 -1.5) (layer F.SilkS) (width 0.15)) 17 | (fp_line (start 2.5 16.5) (end 2.5 -1.5) (layer F.SilkS) (width 0.15)) 18 | (fp_line (start -1.5 16.5) (end 2.5 16.5) (layer F.SilkS) (width 0.15)) 19 | (fp_line (start -1.5 -1.5) (end -1.5 16.5) (layer F.SilkS) (width 0.15)) 20 | (pad 1 thru_hole circle (at 0 0) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 21 | (pad 2 thru_hole circle (at 0 2.54) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 22 | (pad 3 thru_hole rect (at 0 5.08) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 23 | (pad 4 thru_hole circle (at 0 7.62) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 24 | (pad 5 thru_hole circle (at 0 10.16) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 25 | (pad 6 thru_hole circle (at 0 12.7) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 26 | (pad 7 thru_hole circle (at 0 15.24) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 27 | ) 28 | -------------------------------------------------------------------------------- /software/OPAVES_MkII.gpr: -------------------------------------------------------------------------------- 1 | with "board_support/OPAVES_MkI_Board.gpr"; 2 | with "Certyflie/crazyflie_support/crazyflie_support.gpr"; 3 | 4 | project OPAVES_MkII is 5 | 6 | type Modes is ("Compile", "Analyze"); 7 | Mode : Modes := External ("MODE", "Compile"); 8 | 9 | for Languages use ("Ada"); 10 | for Source_Dirs use ("src"); 11 | for Object_Dir use "obj"; 12 | for Create_Missing_Dirs use "True"; 13 | for Target use "arm-eabi"; 14 | for Runtime ("Ada") use "ravenscar-full-stm32f4"; 15 | 16 | for Main use ("main.adb"); 17 | 18 | package Compiler renames OPAVES_MkI_Board.Compiler; 19 | 20 | package Builder is 21 | case Mode is 22 | when "Compile" => 23 | -- rename attributes from Config.Builder if needed 24 | when "Analyze" => 25 | for Global_Configuration_Pragmas use "prove/spark.adc"; 26 | for Global_Compilation_Switches ("Ada") use 27 | ("-gnateT=" & OPAVES_MkII'Project_Dir & "/prove/target.atp"); 28 | end case; 29 | end Builder; 30 | 31 | package Prove is 32 | for Switches use ("-j0", "-u", "opaves-wheel_speed.adb"); 33 | end Prove; 34 | 35 | package Linker is 36 | for Default_Switches ("Ada") use ("-Wl,--print-memory-usage", 37 | "-Wl,--gc-sections"); 38 | end Linker; 39 | 40 | package IDE is 41 | for Program_Host use "localhost:4242"; 42 | for Communication_Protocol use "remote"; 43 | for Connection_Tool use "st-util"; 44 | end IDE; 45 | 46 | package Gnattest is 47 | for Harness_Dir use "../tests_database"; 48 | for Gnattest_Switches use ("-r"); 49 | end Gnattest; 50 | 51 | package CodePeer is 52 | for Switches use ("-32bits", 53 | "-gnateT=" & OPAVES_MkII'Project_Dir & "/prove/target.atp"); 54 | end CodePeer; 55 | 56 | package Check is 57 | for Default_Switches ("Ada") use ("-rules", "-from=coding_standard"); 58 | end Check; 59 | 60 | end OPAVES_MkII; 61 | -------------------------------------------------------------------------------- /software/host/main.adb: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with Ada.Text_IO; use Ada.Text_IO; 20 | with Ada.Command_Line; use Ada.Command_Line; 21 | with Opaves_Host; 22 | 23 | procedure Main is 24 | begin 25 | if Argument_Count /= 1 then 26 | Put_Line ("usage: " & Command_Name & " serial-port"); 27 | Set_Exit_Status (Failure); 28 | return; 29 | end if; 30 | 31 | Opaves_Host.Init (Argument (1)); 32 | 33 | loop 34 | declare 35 | Buf : String (1 .. 16); 36 | Len : Natural; 37 | begin 38 | Opaves_Host.Ping ("Ping", Buf, Len); 39 | Put_Line (Buf (1 .. Len)); 40 | delay 1.0; 41 | end; 42 | end loop; 43 | end Main; 44 | -------------------------------------------------------------------------------- /hardware/electronic/MK1/MK1.pro: -------------------------------------------------------------------------------- 1 | update=jeu. 08 juin 2017 13:23:49 CEST 2 | version=1 3 | last_client=kicad 4 | [cvpcb] 5 | version=1 6 | NetIExt=net 7 | [general] 8 | version=1 9 | [eeschema] 10 | version=1 11 | LibDir=../components 12 | [eeschema/libraries] 13 | LibName1=power 14 | LibName2=device 15 | LibName3=transistors 16 | LibName4=conn 17 | LibName5=linear 18 | LibName6=regul 19 | LibName7=74xx 20 | LibName8=cmos4000 21 | LibName9=adc-dac 22 | LibName10=memory 23 | LibName11=xilinx 24 | LibName12=microcontrollers 25 | LibName13=dsp 26 | LibName14=microchip 27 | LibName15=analog_switches 28 | LibName16=motorola 29 | LibName17=texas 30 | LibName18=intel 31 | LibName19=audio 32 | LibName20=interface 33 | LibName21=digital-audio 34 | LibName22=philips 35 | LibName23=display 36 | LibName24=cypress 37 | LibName25=siliconi 38 | LibName26=opto 39 | LibName27=atmel 40 | LibName28=contrib 41 | LibName29=valves 42 | LibName30=/home/chouteau/src/OPAVES/github/hardware/electronic/components/OPAVES_components 43 | LibName31=stm32 44 | LibName32=battery_management 45 | LibName33=logo 46 | LibName34=motor_drivers 47 | LibName35=nordicsemi 48 | LibName36=nxp_armmcu 49 | LibName37=powerint 50 | LibName38=Power_Management 51 | LibName39=references 52 | LibName40=silabs 53 | LibName41=stm8 54 | LibName42=switches 55 | LibName43=transf 56 | LibName44=video 57 | LibName45=Worldsemi 58 | LibName46=Xicor 59 | LibName47=Zilog 60 | [pcbnew] 61 | version=1 62 | PageLayoutDescrFile= 63 | LastNetListRead=MK1.net 64 | PadDrill=0.762 65 | PadDrillOvalY=0.762 66 | PadSizeH=1.524 67 | PadSizeV=1.524 68 | PcbTextSizeV=1.5 69 | PcbTextSizeH=1.5 70 | PcbTextThickness=0.3 71 | ModuleTextSizeV=1 72 | ModuleTextSizeH=1 73 | ModuleTextSizeThickness=0.15 74 | SolderMaskClearance=0.09999999999999999 75 | SolderMaskMinWidth=0 76 | DrawSegmentWidth=0.2 77 | BoardOutlineThickness=0.15 78 | ModuleOutlineThickness=0.15 79 | [schematic_editor] 80 | version=1 81 | PageLayoutDescrFile= 82 | PlotDirectoryName= 83 | SubpartIdSeparator=0 84 | SubpartFirstId=65 85 | NetFmtName=Pcbnew 86 | SpiceForceRefPrefix=0 87 | SpiceUseNetNumbers=0 88 | LabSize=60 89 | -------------------------------------------------------------------------------- /software/src/opaves-comm-crtp.adb: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with Console; use Console; 20 | with CRTP_Service; use CRTP_Service; 21 | with Platform_Service; use Platform_Service; 22 | with Link_Interface; use Link_Interface; 23 | 24 | package body OPAVES.Comm.CRTP is 25 | 26 | ---------------- 27 | -- Initialize -- 28 | ---------------- 29 | 30 | procedure Initialize is 31 | begin 32 | -- Initialize the link layer (Radiolink by default in Config.ads). 33 | Link_Init; 34 | 35 | -- Initialize low and high level services. 36 | CRTP_Service_Init; 37 | Platform_Service_Init; 38 | 39 | -- Initialize the console module. 40 | Console_Init; 41 | end Initialize; 42 | 43 | end OPAVES.Comm.CRTP; 44 | -------------------------------------------------------------------------------- /software/src/opaves-types.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with OPAVES.Parameters; use OPAVES.Parameters; 20 | 21 | with Dimension_Types; use Dimension_Types; 22 | 23 | package OPAVES.Types with SPARK_Mode is 24 | 25 | subtype Car_Speed is Speed range 26 | -Max_Absolute_Car_Speed .. Max_Absolute_Car_Speed; 27 | -- A value below zero means that the car is going backwards 28 | 29 | subtype Motor_Revolution_Per_Second is Revolution_Per_Second range 30 | -Max_Motor_RPS .. Max_Motor_RPS; 31 | -- A value below zero means that the motor is spining backwards 32 | 33 | subtype Wheel_Revolution_Per_Second is Revolution_Per_Second range 34 | -Max_Wheel_RPS .. Max_Wheel_RPS; 35 | -- A value below zero means that the wheel is spining backwards 36 | 37 | end OPAVES.Types; 38 | -------------------------------------------------------------------------------- /software/board_support/src/board-leds.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | private with STM32.GPIO; 20 | private with STM32.Device; 21 | 22 | package Board.LEDs is 23 | 24 | type LED_Id is (Red, Green); 25 | 26 | procedure Initialize 27 | with Post => Initialized; 28 | -- Initialize hardware for LEDs 29 | 30 | function Initialized return Boolean; 31 | -- Return True if the hardware is initialized 32 | 33 | procedure Turn_On (LED : LED_Id) 34 | with Pre => Initialized; 35 | procedure Turn_Off (LED : LED_Id) 36 | with Pre => Initialized; 37 | procedure Toggle (LED : LED_Id) 38 | with Pre => Initialized; 39 | 40 | private 41 | LED_Pins : array (LED_Id) of STM32.GPIO.GPIO_Point := 42 | (Red => STM32.Device.PC2, 43 | Green => STM32.Device.PC3); 44 | end Board.LEDs; 45 | -------------------------------------------------------------------------------- /hardware/electronic/MK2/MK2.pro: -------------------------------------------------------------------------------- 1 | update=jeu. 23 nov. 2017 13:44:50 CET 2 | version=1 3 | last_client=kicad 4 | [cvpcb] 5 | version=1 6 | NetIExt=net 7 | [general] 8 | version=1 9 | [pcbnew] 10 | version=1 11 | PageLayoutDescrFile= 12 | LastNetListRead=MK1.net 13 | PadDrill=0.762 14 | PadDrillOvalY=0.762 15 | PadSizeH=1.524 16 | PadSizeV=1.524 17 | PcbTextSizeV=1.5 18 | PcbTextSizeH=1.5 19 | PcbTextThickness=0.3 20 | ModuleTextSizeV=1 21 | ModuleTextSizeH=1 22 | ModuleTextSizeThickness=0.15 23 | SolderMaskClearance=0.09999999999999999 24 | SolderMaskMinWidth=0 25 | DrawSegmentWidth=0.2 26 | BoardOutlineThickness=0.15 27 | ModuleOutlineThickness=0.15 28 | [schematic_editor] 29 | version=1 30 | PageLayoutDescrFile= 31 | PlotDirectoryName= 32 | SubpartIdSeparator=0 33 | SubpartFirstId=65 34 | NetFmtName=Pcbnew 35 | SpiceForceRefPrefix=0 36 | SpiceUseNetNumbers=0 37 | LabSize=60 38 | [eeschema] 39 | version=1 40 | LibDir=../components;../crazyflie2-exp-template-electronics/ecad 41 | [eeschema/libraries] 42 | LibName1=MK2-rescue 43 | LibName2=power 44 | LibName3=device 45 | LibName4=transistors 46 | LibName5=conn 47 | LibName6=linear 48 | LibName7=regul 49 | LibName8=74xx 50 | LibName9=cmos4000 51 | LibName10=adc-dac 52 | LibName11=memory 53 | LibName12=xilinx 54 | LibName13=microcontrollers 55 | LibName14=dsp 56 | LibName15=microchip 57 | LibName16=analog_switches 58 | LibName17=motorola 59 | LibName18=texas 60 | LibName19=intel 61 | LibName20=audio 62 | LibName21=interface 63 | LibName22=digital-audio 64 | LibName23=philips 65 | LibName24=display 66 | LibName25=cypress 67 | LibName26=siliconi 68 | LibName27=opto 69 | LibName28=atmel 70 | LibName29=contrib 71 | LibName30=valves 72 | LibName31=/home/chouteau/src/OPAVES/github/hardware/electronic/components/OPAVES_components 73 | LibName32=stm32 74 | LibName33=battery_management 75 | LibName34=logo 76 | LibName35=motor_drivers 77 | LibName36=nordicsemi 78 | LibName37=nxp_armmcu 79 | LibName38=powerint 80 | LibName39=Power_Management 81 | LibName40=references 82 | LibName41=silabs 83 | LibName42=stm8 84 | LibName43=switches 85 | LibName44=transf 86 | LibName45=video 87 | LibName46=Worldsemi 88 | LibName47=Xicor 89 | LibName48=Zilog 90 | LibName49=OPAVES_components 91 | LibName50=template-cache 92 | -------------------------------------------------------------------------------- /software/src/opaves-wheel_speed.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with Board.Motor_Encoder; 20 | with OPAVES.Types; use OPAVES.Types; 21 | 22 | package OPAVES.Wheel_Speed with SPARK_Mode is 23 | 24 | procedure Capture 25 | with Pre => Board.Motor_Encoder.Initialized; 26 | -- Measure and save Wheel_Speed, Motor_RPS and Wheel_RPS 27 | 28 | function Wheel_Speed return Car_Speed; 29 | -- Mean wheels speed between the last two captures. Note that the wheels 30 | -- may be sliping so this does not indicate the speed of the car. 31 | 32 | function Motor_RPS return Motor_Revolution_Per_Second; 33 | -- Mean revolution per second of the motor shaft between the last two 34 | -- captures. 35 | 36 | function Wheel_RPS return Motor_Revolution_Per_Second; 37 | -- Mean revolution per second of the wheel shaft between the last two 38 | -- captures. 39 | end OPAVES.Wheel_Speed; 40 | -------------------------------------------------------------------------------- /hardware/electronic/encoder/rev_A/gerber/encoder-F.Mask.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Soldermask,Top* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.4+dfsg1-stable) date Thu Feb 9 13:36:58 2017* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11R,1.400000X1.650000*% 11 | %ADD12R,2.432000X2.127200*% 12 | %ADD13O,2.432000X2.127200*% 13 | %ADD14R,1.100000X1.700000*% 14 | %ADD15C,6.800000*% 15 | %ADD16C,1.924000*% 16 | G04 APERTURE END LIST* 17 | D10* 18 | D11* 19 | X130000000Y-79000000D03* 20 | X132000000Y-79000000D03* 21 | D12* 22 | X133000000Y-62920000D03* 23 | D13* 24 | X133000000Y-65460000D03* 25 | X133000000Y-68000000D03* 26 | X133000000Y-70540000D03* 27 | D14* 28 | X130050000Y-76500000D03* 29 | X131950000Y-76500000D03* 30 | X130050000Y-74000000D03* 31 | X131950000Y-74000000D03* 32 | D10* 33 | G36* 34 | X120272005Y-71035893D02* 35 | X121120604Y-70187294D01* 36 | X121969203Y-71035893D01* 37 | X121120604Y-71884492D01* 38 | X120272005Y-71035893D01* 39 | X120272005Y-71035893D01* 40 | G37* 41 | G36* 42 | X121615508Y-72379396D02* 43 | X122464107Y-71530797D01* 44 | X123312706Y-72379396D01* 45 | X122464107Y-73227995D01* 46 | X121615508Y-72379396D01* 47 | X121615508Y-72379396D01* 48 | G37* 49 | G36* 50 | X122357249Y-70294152D02* 51 | X123205848Y-69445553D01* 52 | X124054447Y-70294152D01* 53 | X123205848Y-71142751D01* 54 | X122357249Y-70294152D01* 55 | X122357249Y-70294152D01* 56 | G37* 57 | G36* 58 | X122464107Y-79772005D02* 59 | X123312706Y-80620604D01* 60 | X122464107Y-81469203D01* 61 | X121615508Y-80620604D01* 62 | X122464107Y-79772005D01* 63 | X122464107Y-79772005D01* 64 | G37* 65 | G36* 66 | X121120604Y-81115508D02* 67 | X121969203Y-81964107D01* 68 | X121120604Y-82812706D01* 69 | X120272005Y-81964107D01* 70 | X121120604Y-81115508D01* 71 | X121120604Y-81115508D01* 72 | G37* 73 | G36* 74 | X123205848Y-81857249D02* 75 | X124054447Y-82705848D01* 76 | X123205848Y-83554447D01* 77 | X122357249Y-82705848D01* 78 | X123205848Y-81857249D01* 79 | X123205848Y-81857249D01* 80 | G37* 81 | D15* 82 | X117000000Y-66000000D03* 83 | X117000000Y-87000000D03* 84 | D16* 85 | X125000000Y-84500000D03* 86 | X123203949Y-86296051D03* 87 | X126796051Y-82703949D03* 88 | X125000000Y-68500000D03* 89 | X126796051Y-70296051D03* 90 | X123203949Y-66703949D03* 91 | M02* 92 | -------------------------------------------------------------------------------- /software/board_support/src/board-parameters.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | -- Board parameters provides raw physical dimensions or harware specification 20 | -- of the board. 21 | 22 | package Board.Parameters is 23 | 24 | ------------- 25 | -- Encoder -- 26 | ------------- 27 | 28 | Encoder_Tick_Per_Revolution : constant := 12.0; 29 | -- Number of encoder count for one revolution of the motor shaft 30 | 31 | Encoder_Count_Wrap_Threshold : constant := 2**16 / 2; 32 | -- Threshold to detect that the encoder count wrapped around. This is an 33 | -- empirical value. It's probably possible to compute a more precise 34 | -- threshold from maximum car speed and parameters of the drive train. 35 | 36 | ------------- 37 | -- Gearbox -- 38 | ------------- 39 | 40 | Motor_To_Wheel_Gear_Ratio : constant := 11.6; 41 | -- Gear ratio of the Tamiya High Speed Gear Box in B configuration 42 | 43 | ------------ 44 | -- Wheels -- 45 | ------------ 46 | 47 | Wheel_Diameter : constant := 0.044; -- In meter 48 | 49 | end Board.Parameters; 50 | -------------------------------------------------------------------------------- /software/src/last_chance_handler.adb: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with Board.Motor; 20 | with Board.Steering; 21 | with Board.LEDs; use Board.LEDs; 22 | 23 | package body Last_Chance_Handler is 24 | 25 | ------------------------- 26 | -- Last_Chance_Handler -- 27 | ------------------------- 28 | 29 | procedure Last_Chance_Handler (Msg : System.Address; Line : Integer) is 30 | pragma Unreferenced (Msg, Line); 31 | begin 32 | 33 | -- Turn off the motor 34 | if Board.Motor.Initialized then 35 | Board.Motor.Disable; 36 | end if; 37 | 38 | -- Turn off steering 39 | if Board.Steering.Initialized then 40 | Board.Steering.Disable; 41 | end if; 42 | 43 | -- Initialize LED hardware in case it wasn't done before 44 | Board.LEDs.Initialize; 45 | 46 | loop 47 | Toggle (Red); 48 | for Cnt in 1 .. 1_000_000 loop 49 | -- Busy loop... 50 | null; 51 | end loop; 52 | end loop; 53 | end Last_Chance_Handler; 54 | 55 | end Last_Chance_Handler; 56 | -------------------------------------------------------------------------------- /software/board_support/src/board-motor_encoder.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with HAL; use HAL; 20 | private with STM32.GPIO; 21 | private with STM32.Timers; 22 | private with STM32.Device; 23 | 24 | package Board.Motor_Encoder is 25 | 26 | procedure Initialize 27 | with Post => Initialized; 28 | -- Initialize hardware for motor encoder 29 | 30 | function Initialized return Boolean; 31 | -- Return True if the hardware is initialized and motor encoder ready to 32 | -- use. 33 | 34 | type Direction is (Forward, Backward); 35 | type Encoder_Count is new UInt16; 36 | 37 | function Current_Count return Encoder_Count 38 | with Pre => Initialized; 39 | 40 | function Current_Direction return Direction 41 | with Pre => Initialized; 42 | 43 | private 44 | 45 | Encoder_Tach1 : constant STM32.GPIO.GPIO_Point := STM32.Device.PE9; 46 | Encoder_Tach2 : constant STM32.GPIO.GPIO_Point := STM32.Device.PE11; 47 | 48 | Encoder_Timer : STM32.Timers.Timer renames STM32.Device.Timer_1; 49 | 50 | Encoder_AF : constant STM32.GPIO_Alternate_Function := STM32.Device.GPIO_AF_TIM1_1; 51 | 52 | end Board.Motor_Encoder; 53 | -------------------------------------------------------------------------------- /software/board_support/src/board-logging.adb: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with Logging_With_Categories; 20 | 21 | package body Board.Logging is 22 | 23 | package Log is new Logging_With_Categories 24 | (Categories => Log_Category, 25 | Priorities => Board.Comm.Message_Priority, 26 | Default_Category => Default_Category, 27 | Default_Priority => 0, 28 | Categories_Enabled_By_Default => False, 29 | Prefix_Enabled_By_Default => False, 30 | Log_Line_Backend => Board.Comm.Send); 31 | 32 | procedure Log_Line (Cat : Log_Category; Str : String) renames Log.Log_Line; 33 | procedure Log_Line (Str : String) renames Log.Log_Line; 34 | procedure Enable (Cat : Log_Category) renames Log.Enable; 35 | procedure Disable (Cat : Log_Category) renames Log.Disable; 36 | 37 | begin 38 | 39 | for Cat in Log_Category loop 40 | if Insert_Prefix (Cat) then 41 | Log.Enable_Prefix (Cat); 42 | end if; 43 | 44 | if Enabled_At_Init (Cat) then 45 | Log.Enable (Cat); 46 | end if; 47 | 48 | Log.Set_Priority (Cat, Priority (Cat)); 49 | end loop; 50 | end Board.Logging; 51 | -------------------------------------------------------------------------------- /software/src/main.adb: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with Ada.Real_Time; use Ada.Real_Time; 20 | with Last_Chance_Handler; 21 | pragma Unreferenced (Last_Chance_Handler); 22 | 23 | with Board.Logging; 24 | 25 | with LEDS; use LEDS; 26 | with OPAVES.Comm.CRTP; 27 | with OPAVES.Commander; 28 | with OPAVES.Comm.Serial; 29 | pragma Unreferenced (OPAVES.Comm.Serial); 30 | 31 | with Board.Motor; 32 | with Board.Steering; 33 | 34 | procedure Main is 35 | COMMANDS_PERIOD_MS : constant Time_Span := Milliseconds (2); 36 | Next_Period : Time; 37 | begin 38 | LEDS.LEDS_Init; 39 | 40 | Board.Logging.Log_Line 41 | ("O'PAVES: Open Platform for Autonomous Vehicle Systems"); 42 | 43 | LEDS.Set_System_State (Ready); 44 | 45 | Board.Motor.Initialize; 46 | Board.Motor.Enable; 47 | 48 | Board.Steering.Initialize; 49 | Board.Steering.Enable; 50 | 51 | OPAVES.Comm.CRTP.Initialize; 52 | OPAVES.Commander.Initialize; 53 | 54 | Next_Period := Clock + COMMANDS_PERIOD_MS; 55 | 56 | loop 57 | delay until Next_Period; 58 | 59 | Board.Motor.Set_Throttle (OPAVES.Commander.Get_Throttle_Command); 60 | Board.Steering.Set_Steering (OPAVES.Commander.Get_Steering_Command); 61 | 62 | Next_Period := Next_Period + COMMANDS_PERIOD_MS; 63 | end loop; 64 | end Main; 65 | -------------------------------------------------------------------------------- /hardware/electronic/encoder/encoder-cache.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # C 5 | # 6 | DEF C C 0 10 N Y 1 F N 7 | F0 "C" 25 100 50 H V L CNN 8 | F1 "C" 25 -100 50 H V L CNN 9 | F2 "" 38 -150 50 H V C CNN 10 | F3 "" 0 0 50 H V C CNN 11 | $FPLIST 12 | C? 13 | C_????_* 14 | C_???? 15 | SMD*_c 16 | Capacitor* 17 | $ENDFPLIST 18 | DRAW 19 | P 2 0 1 20 -80 -30 80 -30 N 20 | P 2 0 1 20 -80 30 80 30 N 21 | X ~ 1 0 150 110 D 40 40 1 1 P 22 | X ~ 2 0 -150 110 U 40 40 1 1 P 23 | ENDDRAW 24 | ENDDEF 25 | # 26 | # CIRCLE2 27 | # 28 | DEF CIRCLE2 ~ 0 0 N Y 1 F N 29 | F0 "" 0 100 50 H I C CNN 30 | F1 "CIRCLE2" 0 -100 50 H V C CNN 31 | F2 "" 0 0 60 H I C CNN 32 | F3 "" 0 0 60 H I C CNN 33 | DRAW 34 | C 0 0 300 0 0 0 N 35 | ENDDRAW 36 | ENDDEF 37 | # 38 | # CONN_01X04 39 | # 40 | DEF CONN_01X04 P 0 40 Y N 1 F N 41 | F0 "P" 0 250 50 H V C CNN 42 | F1 "CONN_01X04" 100 0 50 V V C CNN 43 | F2 "" 0 0 50 H V C CNN 44 | F3 "" 0 0 50 H V C CNN 45 | $FPLIST 46 | Pin_Header_Straight_1X04 47 | Pin_Header_Angled_1X04 48 | Socket_Strip_Straight_1X04 49 | Socket_Strip_Angled_1X04 50 | $ENDFPLIST 51 | DRAW 52 | S -50 -145 10 -155 0 1 0 N 53 | S -50 -45 10 -55 0 1 0 N 54 | S -50 55 10 45 0 1 0 N 55 | S -50 155 10 145 0 1 0 N 56 | S -50 200 50 -200 0 1 0 N 57 | X P1 1 -200 150 150 R 50 50 1 1 P 58 | X P2 2 -200 50 150 R 50 50 1 1 P 59 | X P3 3 -200 -50 150 R 50 50 1 1 P 60 | X P4 4 -200 -150 150 R 50 50 1 1 P 61 | ENDDRAW 62 | ENDDEF 63 | # 64 | # Digital_Latch_Hall_Effect_Sensor_TO-92 65 | # 66 | DEF Digital_Latch_Hall_Effect_Sensor_TO-92 U 0 40 Y Y 1 F N 67 | F0 "U" 50 50 60 H V C CNN 68 | F1 "Digital_Latch_Hall_Effect_Sensor_TO-92" 750 -100 60 H V C CNN 69 | F2 "" 0 0 60 H I C CNN 70 | F3 "" 0 0 60 H I C CNN 71 | DRAW 72 | S 0 0 1550 -900 0 1 0 N 73 | X VCC 1 -200 -300 200 R 50 50 1 1 W 74 | X GND 2 -200 -500 200 R 50 50 1 1 W 75 | X OUT 3 -200 -700 200 R 50 50 1 1 O 76 | ENDDRAW 77 | ENDDEF 78 | # 79 | # GND 80 | # 81 | DEF GND #PWR 0 0 Y Y 1 F P 82 | F0 "#PWR" 0 -250 50 H I C CNN 83 | F1 "GND" 0 -150 50 H V C CNN 84 | F2 "" 0 0 50 H V C CNN 85 | F3 "" 0 0 50 H V C CNN 86 | DRAW 87 | P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N 88 | X GND 1 0 0 0 D 50 50 1 1 W N 89 | ENDDRAW 90 | ENDDEF 91 | # 92 | # R 93 | # 94 | DEF R R 0 0 N Y 1 F N 95 | F0 "R" 80 0 50 V V C CNN 96 | F1 "R" 0 0 50 V V C CNN 97 | F2 "" -70 0 50 V V C CNN 98 | F3 "" 0 0 50 H V C CNN 99 | $FPLIST 100 | R_* 101 | Resistor_* 102 | $ENDFPLIST 103 | DRAW 104 | S -40 -100 40 100 0 1 10 N 105 | X ~ 1 0 150 50 D 50 50 1 1 P 106 | X ~ 2 0 -150 50 U 50 50 1 1 P 107 | ENDDRAW 108 | ENDDEF 109 | # 110 | #End Library 111 | -------------------------------------------------------------------------------- /software/board_support/src/board-comm.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with STM32.Device; 20 | with STM32.USARTs; 21 | with STM32.GPIO; 22 | with Ada.Interrupts; 23 | with Ada.Interrupts.Names; 24 | with Interfaces; 25 | 26 | package Board.Comm 27 | with Elaborate_Body 28 | is 29 | Max_Message_Length : constant := 1024; 30 | 31 | subtype Message_Priority is Interfaces.Unsigned_8; 32 | procedure Send (Str : String; 33 | Prio : Message_Priority) 34 | with Pre => Str'Length <= Max_Message_Length; 35 | 36 | procedure Receive (Str : out String; 37 | Len : out Natural) 38 | with Pre => Str'Length <= Max_Message_Length; 39 | 40 | private 41 | 42 | Out_Message_Queue_Length : constant := 20; 43 | In_Message_Queue_Length : constant := 10; 44 | 45 | Baud_Rate : constant STM32.USARTs.Baud_Rates := 9600; 46 | Device : STM32.USARTs.USART renames STM32.Device.USART_3; 47 | 48 | TX_Pin : STM32.GPIO.GPIO_Point renames STM32.Device.PC10; 49 | RX_Pin : STM32.GPIO.GPIO_Point renames STM32.Device.PC11; 50 | 51 | Transceiver_Interrupt_Id : Ada.Interrupts.Interrupt_ID renames 52 | Ada.Interrupts.Names.USART3_Interrupt; 53 | 54 | Transceiver_AF : STM32.GPIO_Alternate_Function renames 55 | STM32.Device.GPIO_AF_USART3_7; 56 | 57 | end Board.Comm; 58 | -------------------------------------------------------------------------------- /software/board_support/src/board-logging.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with Board.Comm; 20 | 21 | package Board.Logging is 22 | 23 | type Log_Category is (Info, Debug, Warning, Error); 24 | 25 | procedure Log_Line (Cat : Log_Category; Str : String); 26 | -- Log under the given category 27 | 28 | procedure Log_Line (Str : String); 29 | -- Log under the default category 30 | 31 | procedure Enable (Cat : Log_Category); 32 | -- Enable logging for the given category. 33 | 34 | procedure Disable (Cat : Log_Category); 35 | -- Disable logging for the given category. 36 | 37 | ------------------- 38 | -- Configuration -- 39 | ------------------- 40 | 41 | Default_Category : constant Log_Category := Info; 42 | 43 | Enabled_At_Init : constant array (Log_Category) of Boolean := 44 | (Info => True, 45 | Debug => True, 46 | Warning => True, 47 | Error => True); 48 | 49 | Insert_Prefix : constant array (Log_Category) of Boolean := 50 | (Info => False, 51 | Debug => True, 52 | Warning => True, 53 | Error => True); 54 | 55 | Priority : constant array (Log_Category) of Board.Comm.Message_Priority := 56 | (Info => 0, 57 | Debug => 1, 58 | Warning => 2, 59 | Error => 3); 60 | 61 | end Board.Logging; 62 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/FTSH-110-XX-XX-DV-XX.kicad_mod: -------------------------------------------------------------------------------- 1 | (module FTSH-110-XX-XX-DV-XX (layer F.Cu) (tedit 588B5941) 2 | (fp_text reference REF** (at -2.9718 -1.1176 90) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value FTSH-110-XX-XX-DV-XX (at 2.8956 -9.8806) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_text user 19 (at 11.5316 2.032 90) (layer F.SilkS) 9 | (effects (font (size 0.8 0.8) (thickness 0.1))) 10 | ) 11 | (fp_circle (center -1.1938 1.2954) (end -1.0668 1.5494) (layer F.SilkS) (width 0.15)) 12 | (fp_text user 20 (at 11.5316 -4.7244 90) (layer F.SilkS) 13 | (effects (font (size 0.8 0.8) (thickness 0.1))) 14 | ) 15 | (fp_text user 2 (at 0.0508 -4.3942 90) (layer F.SilkS) 16 | (effects (font (size 0.8 0.8) (thickness 0.1))) 17 | ) 18 | (fp_text user 1 (at 0.0508 1.7526 90) (layer F.SilkS) 19 | (effects (font (size 0.8 0.8) (thickness 0.1))) 20 | ) 21 | (pad 1 smd rect (at 0 0) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 22 | (pad 2 smd rect (at 0 -2.5781) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 23 | (pad 3 smd rect (at 1.27 0) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 24 | (pad 4 smd rect (at 1.27 -2.5781) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 25 | (pad 5 smd rect (at 2.54 0) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 26 | (pad 6 smd rect (at 2.54 -2.5781) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 27 | (pad 7 smd rect (at 3.81 0) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 28 | (pad 8 smd rect (at 3.81 -2.5781) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 29 | (pad 9 smd rect (at 5.08 0) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 30 | (pad 10 smd rect (at 5.08 -2.5781) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 31 | (pad 11 smd rect (at 6.35 0) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 32 | (pad 12 smd rect (at 6.35 -2.5781) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 33 | (pad 13 smd rect (at 7.62 0) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 34 | (pad 14 smd rect (at 7.62 -2.5781) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 35 | (pad 15 smd rect (at 8.89 0) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 36 | (pad 16 smd rect (at 8.89 -2.5781) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 37 | (pad 17 smd rect (at 10.16 0) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 38 | (pad 18 smd rect (at 10.16 -2.5781) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 39 | (pad 19 smd rect (at 11.43 0) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 40 | (pad 20 smd rect (at 11.43 -2.5781) (size 0.635 2.032) (layers F.Cu F.Paste F.Mask)) 41 | ) 42 | -------------------------------------------------------------------------------- /software/board_support/src/board-ble.adb: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with STM32.GPIO; use STM32.GPIO; 20 | with STM32.Device; use STM32.Device; 21 | with STM32.USARTs; use STM32.USARTs; 22 | 23 | package body Board.BLE is 24 | 25 | procedure Initialize_BLE_UART is 26 | Configuration : GPIO_Port_Configuration; 27 | TX_Pin : GPIO_Point renames PD8; 28 | RX_Pin : GPIO_Point renames PD9; 29 | begin 30 | Enable_Clock (BLE_UART); 31 | Enable_Clock (RX_Pin & TX_Pin); 32 | 33 | Configuration.Mode := Mode_AF; 34 | Configuration.Speed := Speed_50MHz; 35 | Configuration.Output_Type := Push_Pull; 36 | Configuration.Resistors := Pull_Up; 37 | 38 | Configure_IO (RX_Pin & TX_Pin, Config => Configuration); 39 | 40 | Configure_Alternate_Function (RX_Pin & TX_Pin, AF => GPIO_AF_USART3_7); 41 | 42 | STM32.USARTs.Disable (BLE_UART); 43 | 44 | Set_Word_Length (BLE_UART, Word_Length_8); 45 | Set_Stop_Bits (BLE_UART, Stopbits_1); 46 | Set_Parity (BLE_UART, No_Parity); 47 | Set_Oversampling_Mode (BLE_UART, Oversampling_By_16); 48 | Set_Baud_Rate (BLE_UART, 115200); 49 | Set_Mode (BLE_UART, Tx_Rx_Mode); 50 | Set_Flow_Control (BLE_UART, No_Flow_Control); 51 | 52 | Enable (BLE_UART); 53 | end Initialize_BLE_UART; 54 | end Board.BLE; 55 | -------------------------------------------------------------------------------- /software/src/databases.adb: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | package body Databases is 20 | 21 | New_DB_ID : Database_ID_Type := 1; 22 | 23 | ------------ 24 | -- Create -- 25 | ------------ 26 | 27 | function Create (Name : String) return Data_Name_Type is 28 | begin 29 | if Name'Length in 1 .. Data_Name_Type'Length then 30 | declare 31 | Data_Name : Data_Name_Type := (others => ' '); 32 | begin 33 | Data_Name (Data_Name'First .. Data_Name'First + Name'Length - 1) := 34 | Name; 35 | 36 | return Data_Name; 37 | end; 38 | else 39 | raise Constraint_Error 40 | with "Name should have between 1 and 16 characters"; 41 | end if; 42 | end Create; 43 | 44 | ------------------------- 45 | -- Get_New_Database_ID -- 46 | ------------------------- 47 | 48 | function Get_New_Database_ID return Database_ID_Type 49 | is 50 | DB_ID : constant Database_ID_Type := New_DB_ID; 51 | begin 52 | New_DB_ID := New_DB_ID + 1; 53 | 54 | return DB_ID; 55 | end Get_New_Database_ID; 56 | 57 | -------------------------- 58 | -- Get_Last_Database_ID -- 59 | -------------------------- 60 | 61 | function Get_Last_Database_ID return Database_ID_Type is 62 | begin 63 | return New_DB_ID; 64 | end Get_Last_Database_ID; 65 | 66 | end Databases; 67 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/AdaFruit_BNO055_Breakout.kicad_mod: -------------------------------------------------------------------------------- 1 | (module AdaFruit_BNO055_Breakout (layer F.Cu) (tedit 588A04DF) 2 | (fp_text reference REF** (at 0 -3.81) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value AdaFruit_BNO055_Breakout (at 0 -5.08) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_text user ADR (at 3.81 2.54 90) (layer F.SilkS) 9 | (effects (font (size 1 1) (thickness 0.15))) 10 | ) 11 | (fp_text user INT (at 1.27 2.54 90) (layer F.SilkS) 12 | (effects (font (size 1 1) (thickness 0.15))) 13 | ) 14 | (fp_text user PS1 (at -1.27 2.54 90) (layer F.SilkS) 15 | (effects (font (size 1 1) (thickness 0.15))) 16 | ) 17 | (fp_text user PS0 (at -3.81 2.54 90) (layer F.SilkS) 18 | (effects (font (size 1 1) (thickness 0.15))) 19 | ) 20 | (fp_text user RST (at 6.35 15.24 90) (layer F.SilkS) 21 | (effects (font (size 1 1) (thickness 0.15))) 22 | ) 23 | (fp_text user SCL (at 3.81 15.24 90) (layer F.SilkS) 24 | (effects (font (size 1 1) (thickness 0.15))) 25 | ) 26 | (fp_text user SDA (at 1.27 15.24 90) (layer F.SilkS) 27 | (effects (font (size 1 1) (thickness 0.15))) 28 | ) 29 | (fp_text user GND (at -1.27 15.24 90) (layer F.SilkS) 30 | (effects (font (size 1 1) (thickness 0.15))) 31 | ) 32 | (fp_text user 3vo (at -3.81 15.24 90) (layer F.SilkS) 33 | (effects (font (size 1 1) (thickness 0.15))) 34 | ) 35 | (fp_text user Vin (at -6.35 15.24 90) (layer F.SilkS) 36 | (effects (font (size 1 1) (thickness 0.15))) 37 | ) 38 | (fp_line (start 13.97 -1.27) (end 13.97 19.05) (layer F.SilkS) (width 0.15)) 39 | (fp_line (start 13.97 19.05) (end -13.97 19.05) (layer F.SilkS) (width 0.15)) 40 | (fp_line (start -13.97 19.05) (end -13.97 -1.27) (layer F.SilkS) (width 0.15)) 41 | (fp_line (start 13.97 -1.27) (end -13.97 -1.27) (layer F.SilkS) (width 0.15)) 42 | (pad 8 thru_hole circle (at -1.27 0) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 43 | (pad 9 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 44 | (pad 3 thru_hole circle (at -1.27 17.78) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 45 | (pad 4 thru_hole circle (at 1.27 17.78) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 46 | (pad 2 thru_hole circle (at -3.81 17.78) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 47 | (pad 1 thru_hole circle (at -6.35 17.78) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 48 | (pad 5 thru_hole circle (at 3.81 17.78) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 49 | (pad 6 thru_hole circle (at 6.35 17.78) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 50 | (pad 10 thru_hole circle (at 3.81 0) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 51 | (pad 7 thru_hole circle (at -3.81 0) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 52 | ) 53 | -------------------------------------------------------------------------------- /software/board_support/src/board-leds.adb: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with STM32.GPIO; use STM32.GPIO; 20 | with STM32.Device; use STM32.Device; 21 | 22 | package body Board.LEDs is 23 | 24 | Init_Done : Boolean := False; 25 | 26 | ---------------- 27 | -- Initialize -- 28 | ---------------- 29 | 30 | procedure Initialize is 31 | IO_Conf : GPIO_Port_Configuration; 32 | begin 33 | -- Check if already initialized 34 | if Initialized then 35 | return; 36 | end if; 37 | 38 | IO_Conf.Mode := Mode_Out; 39 | IO_Conf.Output_Type := Push_Pull; 40 | IO_Conf.Speed := Speed_Low; 41 | IO_Conf.Resistors := Floating; 42 | 43 | for Pin of LED_Pins loop 44 | Enable_Clock (Pin); 45 | Pin.Configure_IO (IO_Conf); 46 | Pin.Clear; 47 | end loop; 48 | 49 | Init_Done := True; 50 | end Initialize; 51 | 52 | ----------------- 53 | -- Initialized -- 54 | ----------------- 55 | 56 | function Initialized return Boolean 57 | is (Init_Done); 58 | 59 | ------------- 60 | -- Turn_On -- 61 | ------------- 62 | 63 | procedure Turn_On (LED : LED_Id) is 64 | begin 65 | LED_Pins (LED).Set; 66 | end Turn_On; 67 | 68 | -------------- 69 | -- Turn_Off -- 70 | -------------- 71 | 72 | procedure Turn_Off (LED : LED_Id) is 73 | begin 74 | LED_Pins (LED).Clear; 75 | end Turn_Off; 76 | 77 | ------------ 78 | -- Toggle -- 79 | ------------ 80 | 81 | procedure Toggle (LED : LED_Id) is 82 | begin 83 | LED_Pins (LED).Toggle; 84 | end Toggle; 85 | end Board.LEDs; 86 | -------------------------------------------------------------------------------- /software/board_support/src/board-imu.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with HAL.I2C; 20 | 21 | with STM32.Device; 22 | with STM32.I2C; 23 | 24 | with BNO055_I2C_IO; 25 | with Bosch_BNO055; 26 | 27 | package Board.IMU is 28 | 29 | type Value_3D is record 30 | X, Y, Z : Float; 31 | end record; 32 | 33 | type IMU_Data is record 34 | Orientation : Value_3D; 35 | Acceleration : Value_3D; 36 | end record; 37 | 38 | type IMU_Status is 39 | (Uninitialized, 40 | Ready, 41 | Error_Not_Present, 42 | Error_Not_Calibrated, 43 | Error_System); 44 | 45 | procedure Initialize; 46 | 47 | function Status return IMU_Status; 48 | 49 | function Read return IMU_Data 50 | with Pre => Status = Ready; 51 | 52 | private 53 | 54 | IMU_I2C : STM32.I2C.I2C_Port renames STM32.Device.I2C_1; 55 | The_Status : IMU_Status := Uninitialized; 56 | 57 | function Status return IMU_Status is (The_Status); 58 | 59 | -- COM3 low => Address is 16#28# (+ the r/w bit as bit0) 60 | IO : aliased BNO055_I2C_IO.IO_Port := 61 | (Port => IMU_I2C'Access, 62 | Device => 16#50#); 63 | 64 | procedure Delay_Milliseconds (Count : Positive); 65 | 66 | package BNO055 is new Bosch_BNO055 67 | (IO_Port => BNO055_I2C_IO.IO_Port, 68 | Any_IO_Port => BNO055_I2C_IO.Any_IO_Port, 69 | Read => BNO055_I2C_IO.Read, 70 | Write => BNO055_I2C_IO.Write, 71 | Sensor_Data_Buffer => HAL.I2C.I2C_Data, 72 | Read_Buffer => BNO055_I2C_IO.Read_Buffer, 73 | Delay_Milliseconds => Delay_Milliseconds); 74 | 75 | Device : aliased BNO055.BNO055_9DOF_IMU (IO'Access); 76 | 77 | end Board.IMU; 78 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/LGA-28.kicad_mod: -------------------------------------------------------------------------------- 1 | (module LGA-28 (layer F.Cu) (tedit 58877A9A) 2 | (fp_text reference U3 (at -0.5 -3) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value Bosch_BNO055_IMU (at 0 3) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_circle (center 1 1.1) (end 1.1 1.1) (layer F.SilkS) (width 0.15)) 9 | (fp_line (start 5.3 -0.1) (end -0.1 -0.1) (layer F.SilkS) (width 0.15)) 10 | (fp_line (start 5.3 3.9) (end 5.3 -0.1) (layer F.SilkS) (width 0.15)) 11 | (fp_line (start -0.1 3.9) (end 5.3 3.9) (layer F.SilkS) (width 0.15)) 12 | (fp_line (start -0.1 -0.1) (end -0.1 3.9) (layer F.SilkS) (width 0.15)) 13 | (pad 1 smd rect (at 0.35 0.3375) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 14 | (pad 28 smd rect (at 0.85 0.3375) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 15 | (pad 27 smd rect (at 1.35 0.3375) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 16 | (pad 26 smd rect (at 1.85 0.3375) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 17 | (pad 25 smd rect (at 2.35 0.3375) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 18 | (pad 24 smd rect (at 2.85 0.3375) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 19 | (pad 23 smd rect (at 3.35 0.3375) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 20 | (pad 22 smd rect (at 3.85 0.3375) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 21 | (pad 21 smd rect (at 4.35 0.3375) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 22 | (pad 20 smd rect (at 4.85 0.3375) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 23 | (pad 6 smd rect (at 0.35 3.4625) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 24 | (pad 7 smd rect (at 0.85 3.4625) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 25 | (pad 8 smd rect (at 1.35 3.4625) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 26 | (pad 9 smd rect (at 1.85 3.4625) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 27 | (pad 10 smd rect (at 2.35 3.4625) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 28 | (pad 11 smd rect (at 2.85 3.4625) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 29 | (pad 12 smd rect (at 3.35 3.4625) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 30 | (pad 13 smd rect (at 3.85 3.4625) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 31 | (pad 14 smd rect (at 4.35 3.4625) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 32 | (pad 15 smd rect (at 4.85 3.4625) (size 0.25 0.675) (layers F.Cu F.Paste F.Mask)) 33 | (pad 2 smd rect (at 0.2875 1.15) (size 0.575 0.25) (layers F.Cu F.Paste F.Mask)) 34 | (pad 3 smd rect (at 0.2875 1.65) (size 0.575 0.25) (layers F.Cu F.Paste F.Mask)) 35 | (pad 4 smd rect (at 0.2875 2.15) (size 0.575 0.25) (layers F.Cu F.Paste F.Mask)) 36 | (pad 5 smd rect (at 0.2875 2.65) (size 0.575 0.25) (layers F.Cu F.Paste F.Mask)) 37 | (pad 19 smd rect (at 4.9125 1.15) (size 0.575 0.25) (layers F.Cu F.Paste F.Mask)) 38 | (pad 18 smd rect (at 4.9125 1.65) (size 0.575 0.25) (layers F.Cu F.Paste F.Mask)) 39 | (pad 17 smd rect (at 4.9125 2.15) (size 0.575 0.25) (layers F.Cu F.Paste F.Mask)) 40 | (pad 16 smd rect (at 4.9125 2.65) (size 0.575 0.25) (layers F.Cu F.Paste F.Mask)) 41 | ) 42 | -------------------------------------------------------------------------------- /software/src/dimension_types.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | -- Common types with static dimensionality checking 20 | 21 | package Dimension_Types is 22 | 23 | type Dimensionless is new Float 24 | with 25 | Dimension_System => ( 26 | (Unit_Name => Meter, Unit_Symbol => 'm', Dim_Symbol => 'L'), 27 | (Unit_Name => Kilogram, Unit_Symbol => "kg", Dim_Symbol => 'M'), 28 | (Unit_Name => Second, Unit_Symbol => 's', Dim_Symbol => 'T'), 29 | (Unit_Name => Ampere, Unit_Symbol => 'A', Dim_Symbol => 'I'), 30 | (Unit_Name => Kelvin, Unit_Symbol => 'K', Dim_Symbol => '@'), 31 | (Unit_Name => Mole, Unit_Symbol => "mol", Dim_Symbol => 'N'), 32 | (Unit_Name => Candela, Unit_Symbol => "cd", Dim_Symbol => 'J')); 33 | 34 | subtype Length is Dimensionless 35 | with 36 | Dimension => (Symbol => 'm', 37 | Meter => 1, 38 | others => 0); 39 | 40 | Meter : constant Length := Length (1.0); 41 | 42 | subtype Speed is Dimensionless 43 | with 44 | Dimension => (Symbol => "m/s", 45 | Meter => 1, 46 | Second => -1, 47 | others => 0); 48 | 49 | subtype Time is Dimensionless 50 | with 51 | Dimension => (Symbol => "s", 52 | Second => 1, 53 | others => 0); 54 | 55 | Second : constant Time := Time (1.0); 56 | 57 | subtype Frequency is Dimensionless 58 | with 59 | Dimension => (Symbol => "Hz", 60 | Second => -1, 61 | others => 0); 62 | 63 | Hz : constant Frequency := Frequency (1.0); 64 | 65 | subtype Revolution_Per_Second is Frequency; 66 | 67 | end Dimension_Types; 68 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/TAMIYA_HIgh_Speed_Gearbox.kicad_mod: -------------------------------------------------------------------------------- 1 | (module TAMIYA_HIgh_Speed_Gearbox (layer F.Cu) (tedit 588A4673) 2 | (fp_text reference REF** (at 0.5 -5.5) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value TAMIYA_HIgh_Speed_Gearbox (at 0.5 -17.43) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start 9 10) (end 9 -10) (layer F.SilkS) (width 0.15)) 9 | (fp_line (start 19 10) (end 9 10) (layer F.SilkS) (width 0.15)) 10 | (fp_line (start 19 -10) (end 19 10) (layer F.SilkS) (width 0.15)) 11 | (fp_line (start 9 -10) (end 19 -10) (layer F.SilkS) (width 0.15)) 12 | (fp_line (start -18.5 13.5) (end -18.5 10) (layer F.SilkS) (width 0.15)) 13 | (fp_line (start 3.5 10) (end 3.5 20) (layer F.SilkS) (width 0.15)) 14 | (fp_line (start -19.5 10) (end -19.5 -1) (layer F.SilkS) (width 0.15)) 15 | (fp_line (start -18.5 13.5) (end 3.5 13.5) (layer F.SilkS) (width 0.15)) 16 | (fp_line (start 50.5 -1.5) (end -49.5 -1.5) (layer F.SilkS) (width 0.15)) 17 | (fp_line (start -49.5 -1.5) (end -49.5 1.5) (layer F.SilkS) (width 0.15)) 18 | (fp_line (start -49.5 1.5) (end 50.5 1.5) (layer F.SilkS) (width 0.15)) 19 | (fp_line (start 50.5 1.5) (end 50.5 -1.5) (layer F.SilkS) (width 0.15)) 20 | (fp_line (start 10.5 -32) (end -19.5 -32) (layer F.SilkS) (width 0.15)) 21 | (fp_line (start 20.5 -11) (end 20.5 -21) (layer F.SilkS) (width 0.15)) 22 | (fp_line (start 20.5 -21) (end 10.5 -21) (layer F.SilkS) (width 0.15)) 23 | (fp_line (start 10.5 -21) (end 10.5 -32) (layer F.SilkS) (width 0.15)) 24 | (fp_line (start 3.5 20) (end 20.5 20) (layer F.SilkS) (width 0.15)) 25 | (fp_line (start -19.5 10) (end 3.5 10) (layer F.SilkS) (width 0.15)) 26 | (fp_line (start 20.5 20) (end 20.5 -1) (layer F.SilkS) (width 0.15)) 27 | (fp_line (start -19.5 -11) (end -19.5 -32) (layer F.SilkS) (width 0.15)) 28 | (fp_line (start 20.5 -11) (end 26.5 -11) (layer F.SilkS) (width 0.15)) 29 | (fp_line (start 26.5 -11) (end 26.5 -1) (layer F.SilkS) (width 0.15)) 30 | (fp_line (start 26.5 -1) (end 20.5 -1) (layer F.SilkS) (width 0.15)) 31 | (fp_line (start -19.5 -1) (end -25.5 -1) (layer F.SilkS) (width 0.15)) 32 | (fp_line (start -25.5 -1) (end -25.5 -11) (layer F.SilkS) (width 0.15)) 33 | (fp_line (start -25.5 -11) (end -19.5 -11) (layer F.SilkS) (width 0.15)) 34 | (fp_text user Red (at -16.5 12) (layer F.SilkS) 35 | (effects (font (size 1 1) (thickness 0.15))) 36 | ) 37 | (fp_text user Blue (at 1.5 12) (layer F.SilkS) 38 | (effects (font (size 1 1) (thickness 0.15))) 39 | ) 40 | (pad 1 thru_hole circle (at -1.5 12) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 41 | (pad 2 thru_hole circle (at -14 12) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 42 | (pad "" np_thru_hole circle (at 23 -6) (size 3 3) (drill 3) (layers *.Cu *.Mask)) 43 | (pad 21 np_thru_hole circle (at -22 -6) (size 3 3) (drill 3) (layers *.Cu *.Mask)) 44 | (model ${KIPRJMOD}/../../3D_models/for_kicad/TAMIYA_HIgh_Speed_Gear_Box.wrl 45 | (at (xyz 0.787402 0 0.551181)) 46 | (scale (xyz 0.393701 0.393701 0.393701)) 47 | (rotate (xyz -90 0 -90)) 48 | ) 49 | ) 50 | -------------------------------------------------------------------------------- /hardware/electronic/encoder/encoder.pro: -------------------------------------------------------------------------------- 1 | update=jeu. 08 juin 2017 13:44:10 CEST 2 | version=1 3 | last_client=kicad 4 | [pcbnew] 5 | version=1 6 | LastNetListRead= 7 | UseCmpFile=1 8 | PadDrill=0.600000000000 9 | PadDrillOvalY=0.600000000000 10 | PadSizeH=1.500000000000 11 | PadSizeV=1.500000000000 12 | PcbTextSizeV=1.500000000000 13 | PcbTextSizeH=1.500000000000 14 | PcbTextThickness=0.300000000000 15 | ModuleTextSizeV=1.000000000000 16 | ModuleTextSizeH=1.000000000000 17 | ModuleTextSizeThickness=0.150000000000 18 | SolderMaskClearance=0.000000000000 19 | SolderMaskMinWidth=0.000000000000 20 | DrawSegmentWidth=0.200000000000 21 | BoardOutlineThickness=0.100000000000 22 | ModuleOutlineThickness=0.150000000000 23 | [cvpcb] 24 | version=1 25 | NetIExt=net 26 | [general] 27 | version=1 28 | [eeschema] 29 | version=1 30 | LibDir=../components 31 | [eeschema/libraries] 32 | LibName1=power 33 | LibName2=device 34 | LibName3=transistors 35 | LibName4=conn 36 | LibName5=linear 37 | LibName6=regul 38 | LibName7=74xx 39 | LibName8=cmos4000 40 | LibName9=adc-dac 41 | LibName10=memory 42 | LibName11=xilinx 43 | LibName12=microcontrollers 44 | LibName13=dsp 45 | LibName14=microchip 46 | LibName15=analog_switches 47 | LibName16=motorola 48 | LibName17=texas 49 | LibName18=intel 50 | LibName19=audio 51 | LibName20=interface 52 | LibName21=digital-audio 53 | LibName22=philips 54 | LibName23=display 55 | LibName24=cypress 56 | LibName25=siliconi 57 | LibName26=opto 58 | LibName27=atmel 59 | LibName28=contrib 60 | LibName29=valves 61 | LibName30=/home/chouteau/src/OPAVES/github/hardware/electronic/components/OPAVES_components 62 | LibName31=74xgxx 63 | LibName32=ac-dc 64 | LibName33=actel 65 | LibName34=Altera 66 | LibName35=analog_devices 67 | LibName36=battery_management 68 | LibName37=bbd 69 | LibName38=brooktre 70 | LibName39=cmos_ieee 71 | LibName40=dc-dc 72 | LibName41=diode 73 | LibName42=elec-unifil 74 | LibName43=ESD_Protection 75 | LibName44=ftdi 76 | LibName45=gennum 77 | LibName46=graphic 78 | LibName47=hc11 79 | LibName48=ir 80 | LibName49=Lattice 81 | LibName50=logo 82 | LibName51=maxim 83 | LibName52=microchip_dspic33dsc 84 | LibName53=microchip_pic10mcu 85 | LibName54=microchip_pic12mcu 86 | LibName55=microchip_pic16mcu 87 | LibName56=microchip_pic18mcu 88 | LibName57=microchip_pic32mcu 89 | LibName58=motor_drivers 90 | LibName59=msp430 91 | LibName60=nordicsemi 92 | LibName61=nxp_armmcu 93 | LibName62=onsemi 94 | LibName63=Oscillators 95 | LibName64=powerint 96 | LibName65=Power_Management 97 | LibName66=pspice 98 | LibName67=references 99 | LibName68=relays 100 | LibName69=rfcom 101 | LibName70=sensors 102 | LibName71=silabs 103 | LibName72=stm8 104 | LibName73=stm32 105 | LibName74=supertex 106 | LibName75=switches 107 | LibName76=transf 108 | LibName77=ttl_ieee 109 | LibName78=video 110 | LibName79=Worldsemi 111 | LibName80=Xicor 112 | LibName81=Zilog 113 | [schematic_editor] 114 | version=1 115 | PageLayoutDescrFile= 116 | PlotDirectoryName=rev_B/ 117 | SubpartIdSeparator=0 118 | SubpartFirstId=65 119 | NetFmtName= 120 | SpiceForceRefPrefix=0 121 | SpiceUseNetNumbers=0 122 | LabSize=60 123 | -------------------------------------------------------------------------------- /software/board_support/src/board-steering.adb: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with STM32.PWM; use STM32.PWM; 20 | with HAL; use HAL; 21 | 22 | package body Board.Steering is 23 | 24 | Init_Done : Boolean := False; 25 | 26 | ---------------- 27 | -- Initialize -- 28 | ---------------- 29 | 30 | procedure Initialize is 31 | begin 32 | -- Check if already initialized 33 | if Initialized then 34 | return; 35 | end if; 36 | 37 | Configure_PWM_Timer (PWM_Timer'Access, PWM_Frequency); 38 | 39 | Modulator.Attach_PWM_Channel 40 | (PWM_Timer'Access, 41 | PWM_Channel, 42 | PWM_Pin, 43 | PWM_Pin_AF); 44 | 45 | Init_Done := True; 46 | 47 | -- Initial state 48 | Disable; 49 | Set_Steering (0.0); 50 | end Initialize; 51 | 52 | ----------------- 53 | -- Initialized -- 54 | ----------------- 55 | 56 | function Initialized return Boolean 57 | is (Init_Done); 58 | 59 | ------------- 60 | -- Enabled -- 61 | ------------- 62 | 63 | function Enabled return Boolean 64 | is (Modulator.Output_Enabled); 65 | 66 | ------------ 67 | -- Enable -- 68 | ------------ 69 | 70 | procedure Enable is 71 | begin 72 | Modulator.Enable_Output; 73 | end Enable; 74 | 75 | ------------- 76 | -- Disable -- 77 | ------------- 78 | 79 | procedure Disable is 80 | begin 81 | Modulator.Disable_Output; 82 | end Disable; 83 | 84 | ------------------ 85 | -- Set_Steering -- 86 | ------------------ 87 | 88 | procedure Set_Steering (Value : Steering_Value) is 89 | Ms : constant Float := Center_Pulse_MS + 90 | (Float (Value) / 100.0) * Range_Pulse_MS / 2.0; 91 | begin 92 | Modulator.Set_Duty_Time (Microseconds (Ms * 1000.0)); 93 | end Set_Steering; 94 | end Board.Steering; 95 | -------------------------------------------------------------------------------- /software/src/opaves-parameters.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with Board.Parameters; 20 | 21 | with Dimension_Types; use Dimension_Types; 22 | 23 | with Ada.Numerics; 24 | 25 | package OPAVES.Parameters with SPARK_Mode is 26 | 27 | ---------------------- 28 | -- Board Parameters -- 29 | ---------------------- 30 | 31 | -- Redefinition of board parameters with apropriate types 32 | 33 | Wheel_Diameter : constant Length := Length (Board.Parameters.Wheel_Diameter); 34 | 35 | Wheel_Circumference : constant Length := Ada.Numerics.Pi * Wheel_Diameter; 36 | 37 | Motor_To_Wheel_Gear_Ratio : constant Dimensionless := 38 | Dimensionless (Board.Parameters.Motor_To_Wheel_Gear_Ratio); 39 | 40 | Encoder_Tick_Per_Revolution : constant Dimensionless := 41 | Dimensionless (Board.Parameters.Encoder_Tick_Per_Revolution); 42 | 43 | Encoder_Count_Wrap_Threshold : constant Dimensionless := 44 | Dimensionless (Board.Parameters.Encoder_Count_Wrap_Threshold); 45 | 46 | ---------------------- 47 | -- Speed Boundaries -- 48 | ---------------------- 49 | 50 | Max_Absolute_Car_Speed : constant Speed := Speed (4.0); 51 | -- Empirical absolute maximum speed of the car 52 | 53 | Max_Wheel_RPS : constant Revolution_Per_Second := Max_Absolute_Car_Speed / Wheel_Circumference; 54 | -- Maximum revolution per second of the wheel shaft 55 | 56 | Max_Motor_RPS : constant Revolution_Per_Second := Max_Wheel_RPS * Motor_To_Wheel_Gear_Ratio; 57 | -- Maximum revolution per second of the motor shaft 58 | 59 | Max_Encoder_Ticks_Per_Second : constant Frequency := Max_Wheel_RPS * Encoder_Tick_Per_Revolution; 60 | -- Maximum number of encoder ticks per second 61 | 62 | Max_Encoder_Read_Interval : constant Time := Encoder_Count_Wrap_Threshold / Max_Encoder_Ticks_Per_Second; 63 | -- Maximum time between two reading of the encoder to ensure a valid value 64 | 65 | end OPAVES.Parameters; 66 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/RN4871.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RN4871 (layer F.Cu) (tedit 58908821) 2 | (fp_text reference REF** (at -6 -5) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value RN4871 (at -7 -3) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_text user Keep-Out (at 1.9 -5.3 90) (layer Dwgs.User) 9 | (effects (font (size 0.5 0.5) (thickness 0.125))) 10 | ) 11 | (fp_line (start 7.9 -7) (end 7.9 -1.5) (layer Dwgs.User) (width 0.15)) 12 | (fp_line (start 1.1 -7.5) (end 1.1 -4.6) (layer Dwgs.User) (width 0.15)) 13 | (fp_line (start 3 -4.6) (end 3 -7.5) (layer Dwgs.User) (width 0.15)) 14 | (fp_line (start 1.1 -4.6) (end 3 -4.6) (layer Dwgs.User) (width 0.15)) 15 | (fp_line (start 4.3 -7) (end 7.9 -7) (layer Dwgs.User) (width 0.15)) 16 | (fp_line (start 4.3 -1.5) (end 4.3 -7) (layer Dwgs.User) (width 0.15)) 17 | (fp_line (start 7.9 -1.5) (end 4.3 -1.5) (layer Dwgs.User) (width 0.15)) 18 | (fp_line (start 0 -7.5) (end 9 -7.5) (layer F.SilkS) (width 0.15)) 19 | (fp_line (start 9 0) (end 0 0) (layer F.SilkS) (width 0.15)) 20 | (fp_line (start 9 -7.5) (end 9 0) (layer F.SilkS) (width 0.15)) 21 | (fp_line (start 0 -11.5) (end 9 -11.5) (layer Margin) (width 0.15)) 22 | (fp_line (start 0 0) (end 0 -7.5) (layer F.SilkS) (width 0.15)) 23 | (fp_line (start 0 -7.5) (end 0 -11.5) (layer Margin) (width 0.15)) 24 | (fp_line (start 9 -7.5) (end 9 -11.5) (layer Margin) (width 0.15)) 25 | (fp_text user Keep-Out (at 6 -4.3 90) (layer Dwgs.User) 26 | (effects (font (size 0.5 0.5) (thickness 0.125))) 27 | ) 28 | (fp_text user "PCB edge" (at 4.3 -8.2) (layer Dwgs.User) 29 | (effects (font (size 0.5 0.5) (thickness 0.125))) 30 | ) 31 | (pad 5 smd rect (at 0 -1.9) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 32 | (pad 6 smd rect (at 1.5 0 90) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 33 | (pad 7 smd rect (at 2.7 0 90) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 34 | (pad 8 smd rect (at 3.9 0 90) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 35 | (pad 9 smd rect (at 5.1 0 90) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 36 | (pad 10 smd rect (at 6.3 0 90) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 37 | (pad 11 smd rect (at 7.5 0 90) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 38 | (pad 4 smd rect (at 0 -3.1) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 39 | (pad 3 smd rect (at 0 -4.3) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 40 | (pad 2 smd rect (at 0 -5.5) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 41 | (pad 1 smd rect (at 0 -6.7) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 42 | (pad 12 smd rect (at 9 -1.9 180) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 43 | (pad 13 smd rect (at 9 -3.1 180) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 44 | (pad 14 smd rect (at 9 -4.3 180) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 45 | (pad 15 smd rect (at 9 -5.5 180) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 46 | (pad 16 smd rect (at 9 -6.7 180) (size 1.5 0.7) (drill (offset 0.25 0)) (layers F.Cu F.Paste F.Mask)) 47 | ) 48 | -------------------------------------------------------------------------------- /software/src/databases-instantiations.adb: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | with Ada.Real_Time; use Ada.Real_Time; 19 | 20 | package body Databases.Instantiations is 21 | 22 | LOGGING_TASK_PERIOD : constant Time_Span := Seconds (2); 23 | 24 | --------- 25 | -- Set -- 26 | --------- 27 | 28 | procedure Set 29 | (Database_ID : Database_ID_Type; 30 | Data_ID : Data_ID_Type; 31 | Image : String) is 32 | begin 33 | Databases (Database_ID).Set 34 | (Data_ID => Data_ID, 35 | Image => Image); 36 | end Set; 37 | 38 | --------- 39 | -- Get -- 40 | --------- 41 | 42 | function Get 43 | (Database_ID : Database_ID_Type; 44 | Data_ID : Data_ID_Type) 45 | return String 46 | is 47 | begin 48 | return Databases (Database_ID).Get (Data_ID); 49 | end Get; 50 | 51 | ------------- 52 | -- Get_IDs -- 53 | ------------- 54 | 55 | function Get_IDs 56 | (Data_Name : Data_Name_Type; 57 | Database_ID : out Database_ID_Type; 58 | Data_ID : out Data_ID_Type) return Boolean 59 | is 60 | Cur_Data_ID : Data_ID_Type; 61 | begin 62 | for Database of Databases loop 63 | Cur_Data_ID := Database.Get_Data_ID (Data_Name); 64 | 65 | if Cur_Data_ID /= Null_Data_ID then 66 | Database_ID := Database.Get_ID; 67 | Data_ID := Cur_Data_ID; 68 | 69 | return True; 70 | end if; 71 | end loop; 72 | 73 | return False; 74 | end Get_IDs; 75 | 76 | ------------------ 77 | -- Logging_Task -- 78 | ------------------ 79 | 80 | task body Logging_Task is 81 | Next_Period : Time; 82 | begin 83 | Next_Period := Clock + LOGGING_TASK_PERIOD; 84 | 85 | loop 86 | delay until Next_Period; 87 | 88 | for Database of Databases loop 89 | Database.Log_All_Data; 90 | end loop; 91 | 92 | Next_Period := Next_Period + LOGGING_TASK_PERIOD; 93 | end loop; 94 | end Logging_Task; 95 | 96 | end Databases.Instantiations; 97 | -------------------------------------------------------------------------------- /software/board_support/src/board-steering.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | private with STM32.GPIO; 20 | private with STM32.Timers; 21 | private with STM32.PWM; 22 | private with STM32.Device; 23 | 24 | package Board.Steering is 25 | 26 | subtype Steering_Value is Float range -100.0 .. 100.0; 27 | 28 | procedure Initialize 29 | with Post => Initialized and then not Enabled; 30 | -- Initialize hardware for steering control 31 | 32 | function Initialized return Boolean; 33 | -- Return True if the hardware is initialized and steering ready to use. 34 | 35 | function Enabled return Boolean 36 | with Pre => Initialized; 37 | -- Return True if steering is enabled 38 | 39 | procedure Enable 40 | with Pre => Initialized, 41 | Post => Enabled; 42 | 43 | procedure Disable 44 | with Pre => Initialized, 45 | Post => not Enabled; 46 | 47 | procedure Set_Steering (Value : Steering_Value) 48 | with Pre => Initialized; 49 | private 50 | 51 | PWM_Pin : STM32.GPIO.GPIO_Point renames STM32.Device.PA5; 52 | PWM_Pin_AF : STM32.GPIO_Alternate_Function renames STM32.Device.GPIO_AF_TIM2_1; 53 | 54 | PWM_Timer : STM32.Timers.Timer renames STM32.Device.Timer_2; 55 | PWM_Channel : STM32.Timers.Timer_Channel := STM32.Timers.Channel_1; 56 | PWM_Period : constant := 1000; 57 | 58 | PWM_Frequency : constant := 20; -- Hertz 59 | Modulator : STM32.PWM.PWM_Modulator; 60 | 61 | Min_Pulse_MS : constant := 1.0; 62 | -- Minimum uptime for the PWM pulse. Corresponds to servo's maximum 63 | -- counter-clockwise movement. 64 | Max_Pulse_Ms : constant := 2.0; 65 | -- Maximum uptime for the PWM pulse. Corresponds to servo's maximum 66 | -- clockwise movement. 67 | 68 | Range_Pulse_MS : constant := Max_Pulse_Ms - Min_Pulse_MS; 69 | -- Difference between the max and min PWM pulse 70 | 71 | Center_Pulse_MS : constant := Min_Pulse_MS + Range_Pulse_MS / 2.0; 72 | -- PWM uptime to set the servo in its center posistion 73 | 74 | end Board.Steering; 75 | -------------------------------------------------------------------------------- /software/board_support/src/board-motor.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | private with STM32.GPIO; 20 | private with STM32.Timers; 21 | private with STM32.PWM; 22 | private with STM32.Device; 23 | 24 | package Board.Motor is 25 | 26 | subtype Throttle is Float range -100.0 .. 100.0; 27 | 28 | procedure Initialize 29 | with Post => Initialized and then not Enabled; 30 | -- Initialize hardware for motor control 31 | 32 | function Initialized return Boolean; 33 | -- Return True if the hardware is initialized and motor control ready to 34 | -- use. 35 | 36 | function Enabled return Boolean 37 | with Pre => Initialized; 38 | -- Return True if the motor is enabled 39 | 40 | procedure Enable 41 | with Pre => Initialized; 42 | -- Enable the motor. This doesn't mean that the motor will start, e.g. when 43 | -- the throttle is at zero. 44 | 45 | procedure Disable 46 | with Pre => Initialized; 47 | -- Disable the motor. This coresponds to the standby mode on the motor 48 | -- driver chip. 49 | 50 | procedure Set_Throttle (Throt : Throttle) 51 | with Pre => Initialized; 52 | -- Set thottle of the motors. A value above zero means that the motor will 53 | -- make the car move forward. 54 | 55 | private 56 | In1_Pin : STM32.GPIO.GPIO_Point renames STM32.Device.PB4; 57 | In2_Pin : STM32.GPIO.GPIO_Point renames STM32.Device.PB8; 58 | 59 | Standby_Pin : STM32.GPIO.GPIO_Point renames STM32.Device.PB5; 60 | -- Standby is active low 61 | 62 | PWM_1_Pin : STM32.GPIO.GPIO_Point renames STM32.Device.PA2; 63 | PWM_2_Pin : STM32.GPIO.GPIO_Point renames STM32.Device.PA3; 64 | PWM_Pin_AF : STM32.GPIO_Alternate_Function renames STM32.Device.GPIO_AF_TIM9_3; 65 | 66 | PWM_Timer : STM32.Timers.Timer renames STM32.Device.Timer_9; 67 | PWM_1_Channel : STM32.Timers.Timer_Channel := STM32.Timers.Channel_1; 68 | PWM_2_Channel : STM32.Timers.Timer_Channel := STM32.Timers.Channel_2; 69 | PWM_Frequency : constant := 25_000; -- Hertz 70 | Modulator_1 : STM32.PWM.PWM_Modulator; 71 | Modulator_2 : STM32.PWM.PWM_Modulator; 72 | end Board.Motor; 73 | -------------------------------------------------------------------------------- /software/tests_database/databases-instantiations-test_data-tests-float_databases-database_type_test_data-database_type_tests-suite.adb: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with AUnit.Test_Caller; 6 | with Gnattest_Generated; 7 | 8 | package body Databases.Instantiations.Test_Data.Tests.Float_Databases.Database_Type_Test_Data.Database_Type_Tests.Suite is 9 | 10 | package Runner_1 is new AUnit.Test_Caller 11 | (GNATtest_Generated.GNATtest_Standard.Databases.Instantiations.Test_Data.Tests.Float_Databases.Database_Type_Test_Data.Database_Type_Tests.Test_Database_Type); 12 | 13 | Result : aliased AUnit.Test_Suites.Test_Suite; 14 | 15 | Case_1_1_Test_ID_c61842 : aliased Runner_1.Test_Case; 16 | Case_2_1_Test_Get_092341 : aliased Runner_1.Test_Case; 17 | Case_3_1_Test_Get_Timestamp_aa6da1 : aliased Runner_1.Test_Case; 18 | Case_4_1_Test_Set_8399ce : aliased Runner_1.Test_Case; 19 | Case_5_1_Test_Register_33e98f : aliased Runner_1.Test_Case; 20 | Case_6_1_Test_Get_Data_ID_7a2a32 : aliased Runner_1.Test_Case; 21 | Case_7_1_Test_Get_46e83a : aliased Runner_1.Test_Case; 22 | Case_8_1_Test_Set_89ccfc : aliased Runner_1.Test_Case; 23 | Case_9_1_Test_Log_All_Data_b000e7 : aliased Runner_1.Test_Case; 24 | 25 | function Suite return AUnit.Test_Suites.Access_Test_Suite is 26 | begin 27 | 28 | Runner_1.Create 29 | (Case_1_1_Test_ID_c61842, 30 | "databases-generics.ads:44:4 instance at databases-instantiations.ads:43:4:", 31 | Test_ID_c61842'Access); 32 | Runner_1.Create 33 | (Case_2_1_Test_Get_092341, 34 | "databases-generics.ads:47:4 instance at databases-instantiations.ads:43:4:", 35 | Test_Get_092341'Access); 36 | Runner_1.Create 37 | (Case_3_1_Test_Get_Timestamp_aa6da1, 38 | "databases-generics.ads:52:4 instance at databases-instantiations.ads:43:4:", 39 | Test_Get_Timestamp_aa6da1'Access); 40 | Runner_1.Create 41 | (Case_4_1_Test_Set_8399ce, 42 | "databases-generics.ads:56:4 instance at databases-instantiations.ads:43:4:", 43 | Test_Set_8399ce'Access); 44 | Runner_1.Create 45 | (Case_5_1_Test_Register_33e98f, 46 | "databases-generics.ads:62:4 instance at databases-instantiations.ads:43:4:", 47 | Test_Register_33e98f'Access); 48 | Runner_1.Create 49 | (Case_6_1_Test_Get_Data_ID_7a2a32, 50 | "databases-generics.ads:66:4 instance at databases-instantiations.ads:43:4:", 51 | Test_Get_Data_ID_7a2a32'Access); 52 | Runner_1.Create 53 | (Case_7_1_Test_Get_46e83a, 54 | "databases-generics.ads:70:4 instance at databases-instantiations.ads:43:4:", 55 | Test_Get_46e83a'Access); 56 | Runner_1.Create 57 | (Case_8_1_Test_Set_89ccfc, 58 | "databases-generics.ads:74:4 instance at databases-instantiations.ads:43:4:", 59 | Test_Set_89ccfc'Access); 60 | Runner_1.Create 61 | (Case_9_1_Test_Log_All_Data_b000e7, 62 | "databases-generics.ads:79:4 instance at databases-instantiations.ads:43:4:", 63 | Test_Log_All_Data_b000e7'Access); 64 | 65 | Result.Add_Test (Case_1_1_Test_ID_c61842'Access); 66 | Result.Add_Test (Case_2_1_Test_Get_092341'Access); 67 | Result.Add_Test (Case_3_1_Test_Get_Timestamp_aa6da1'Access); 68 | Result.Add_Test (Case_4_1_Test_Set_8399ce'Access); 69 | Result.Add_Test (Case_5_1_Test_Register_33e98f'Access); 70 | Result.Add_Test (Case_6_1_Test_Get_Data_ID_7a2a32'Access); 71 | Result.Add_Test (Case_7_1_Test_Get_46e83a'Access); 72 | Result.Add_Test (Case_8_1_Test_Set_89ccfc'Access); 73 | Result.Add_Test (Case_9_1_Test_Log_All_Data_b000e7'Access); 74 | 75 | return Result'Access; 76 | 77 | end Suite; 78 | 79 | end Databases.Instantiations.Test_Data.Tests.Float_Databases.Database_Type_Test_Data.Database_Type_Tests.Suite; 80 | -- end read only 81 | -------------------------------------------------------------------------------- /software/tests_database/databases-instantiations-test_data-tests-integer_databases-database_type_test_data-database_type_tests-suite.adb: -------------------------------------------------------------------------------- 1 | -- This package has been generated automatically by GNATtest. 2 | -- Do not edit any part of it, see GNATtest documentation for more details. 3 | 4 | -- begin read only 5 | with AUnit.Test_Caller; 6 | with Gnattest_Generated; 7 | 8 | package body Databases.Instantiations.Test_Data.Tests.Integer_Databases.Database_Type_Test_Data.Database_Type_Tests.Suite is 9 | 10 | package Runner_1 is new AUnit.Test_Caller 11 | (GNATtest_Generated.GNATtest_Standard.Databases.Instantiations.Test_Data.Tests.Integer_Databases.Database_Type_Test_Data.Database_Type_Tests.Test_Database_Type); 12 | 13 | Result : aliased AUnit.Test_Suites.Test_Suite; 14 | 15 | Case_1_1_Test_ID_c61842 : aliased Runner_1.Test_Case; 16 | Case_2_1_Test_Get_092341 : aliased Runner_1.Test_Case; 17 | Case_3_1_Test_Get_Timestamp_aa6da1 : aliased Runner_1.Test_Case; 18 | Case_4_1_Test_Set_8399ce : aliased Runner_1.Test_Case; 19 | Case_5_1_Test_Register_33e98f : aliased Runner_1.Test_Case; 20 | Case_6_1_Test_Get_Data_ID_7a2a32 : aliased Runner_1.Test_Case; 21 | Case_7_1_Test_Get_46e83a : aliased Runner_1.Test_Case; 22 | Case_8_1_Test_Set_89ccfc : aliased Runner_1.Test_Case; 23 | Case_9_1_Test_Log_All_Data_b000e7 : aliased Runner_1.Test_Case; 24 | 25 | function Suite return AUnit.Test_Suites.Access_Test_Suite is 26 | begin 27 | 28 | Runner_1.Create 29 | (Case_1_1_Test_ID_c61842, 30 | "databases-generics.ads:44:4 instance at databases-instantiations.ads:38:4:", 31 | Test_ID_c61842'Access); 32 | Runner_1.Create 33 | (Case_2_1_Test_Get_092341, 34 | "databases-generics.ads:47:4 instance at databases-instantiations.ads:38:4:", 35 | Test_Get_092341'Access); 36 | Runner_1.Create 37 | (Case_3_1_Test_Get_Timestamp_aa6da1, 38 | "databases-generics.ads:52:4 instance at databases-instantiations.ads:38:4:", 39 | Test_Get_Timestamp_aa6da1'Access); 40 | Runner_1.Create 41 | (Case_4_1_Test_Set_8399ce, 42 | "databases-generics.ads:56:4 instance at databases-instantiations.ads:38:4:", 43 | Test_Set_8399ce'Access); 44 | Runner_1.Create 45 | (Case_5_1_Test_Register_33e98f, 46 | "databases-generics.ads:62:4 instance at databases-instantiations.ads:38:4:", 47 | Test_Register_33e98f'Access); 48 | Runner_1.Create 49 | (Case_6_1_Test_Get_Data_ID_7a2a32, 50 | "databases-generics.ads:66:4 instance at databases-instantiations.ads:38:4:", 51 | Test_Get_Data_ID_7a2a32'Access); 52 | Runner_1.Create 53 | (Case_7_1_Test_Get_46e83a, 54 | "databases-generics.ads:70:4 instance at databases-instantiations.ads:38:4:", 55 | Test_Get_46e83a'Access); 56 | Runner_1.Create 57 | (Case_8_1_Test_Set_89ccfc, 58 | "databases-generics.ads:74:4 instance at databases-instantiations.ads:38:4:", 59 | Test_Set_89ccfc'Access); 60 | Runner_1.Create 61 | (Case_9_1_Test_Log_All_Data_b000e7, 62 | "databases-generics.ads:79:4 instance at databases-instantiations.ads:38:4:", 63 | Test_Log_All_Data_b000e7'Access); 64 | 65 | Result.Add_Test (Case_1_1_Test_ID_c61842'Access); 66 | Result.Add_Test (Case_2_1_Test_Get_092341'Access); 67 | Result.Add_Test (Case_3_1_Test_Get_Timestamp_aa6da1'Access); 68 | Result.Add_Test (Case_4_1_Test_Set_8399ce'Access); 69 | Result.Add_Test (Case_5_1_Test_Register_33e98f'Access); 70 | Result.Add_Test (Case_6_1_Test_Get_Data_ID_7a2a32'Access); 71 | Result.Add_Test (Case_7_1_Test_Get_46e83a'Access); 72 | Result.Add_Test (Case_8_1_Test_Set_89ccfc'Access); 73 | Result.Add_Test (Case_9_1_Test_Log_All_Data_b000e7'Access); 74 | 75 | return Result'Access; 76 | 77 | end Suite; 78 | 79 | end Databases.Instantiations.Test_Data.Tests.Integer_Databases.Database_Type_Test_Data.Database_Type_Tests.Suite; 80 | -- end read only 81 | -------------------------------------------------------------------------------- /software/src/databases-instantiations.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with Databases.Generics; 20 | 21 | package Databases.Instantiations is 22 | 23 | procedure Set 24 | (Database_ID : Database_ID_Type; 25 | Data_ID : Data_ID_Type; 26 | Image : String); 27 | -- Set the value for the data associated with the given Data_ID. 28 | -- The value is given as a string and is then converted using the 29 | -- associated Value function (see databases-generics.ads). 30 | -- Should be used by the Communication module. 31 | 32 | function Get 33 | (Database_ID : Database_ID_Type; 34 | Data_ID : Data_ID_Type) return String; 35 | -- Get the value for the data associated with the given Data_ID. 36 | -- The value is returned as a string, using the associated Image function 37 | -- for the conversion (see databases-generics.ads). 38 | -- Should be used by the Communication module 39 | 40 | function Get_IDs 41 | (Data_Name : Data_Name_Type; 42 | Database_ID : out Database_ID_Type; 43 | Data_ID : out Data_ID_Type) return Boolean; 44 | -- Get the database ID and the data ID associated with the given Data_Name, 45 | -- if any. 46 | -- Return True if the IDs have been found, False otherwise. 47 | 48 | task Logging_Task; 49 | -- A task used to log all the data contained in all the instantiated 50 | -- databases. 51 | 52 | package Integer_Databases is new Databases.Generics 53 | (Integer, 54 | Image => Integer'Image, 55 | Value => Integer'Value, 56 | Init_Data => 0, 57 | Max_Nb_Data => 10); 58 | package Float_Databases is new Databases.Generics 59 | (Float, 60 | Image => Float'Image, 61 | Value => Float'Value, 62 | Init_Data => 0.0, 63 | Max_Nb_Data => 20); 64 | package Boolean_Databases is new Databases.Generics 65 | (Boolean, 66 | Image => Boolean'Image, 67 | Value => Boolean'Value, 68 | Init_Data => False, 69 | Max_Nb_Data => 10); 70 | 71 | private 72 | First_ID : constant Database_ID_Type := First_Database_ID; 73 | Last_ID : constant Database_ID_Type := Get_Last_Database_ID; 74 | 75 | Databases : constant Root_Database_Array (First_ID .. First_ID + 2) := 76 | (First_ID => Root_Database_Access 77 | (Integer_Databases.Get_Database_Instance), 78 | First_ID + 1 => Root_Database_Access 79 | (Float_Databases.Get_Database_Instance), 80 | First_ID + 2 => Root_Database_Access 81 | (Boolean_Databases.Get_Database_Instance)); 82 | 83 | end Databases.Instantiations; 84 | -------------------------------------------------------------------------------- /hardware/electronic/MK2/motor.sch: -------------------------------------------------------------------------------- 1 | EESchema Schematic File Version 2 2 | LIBS:power 3 | LIBS:device 4 | LIBS:transistors 5 | LIBS:conn 6 | LIBS:linear 7 | LIBS:regul 8 | LIBS:74xx 9 | LIBS:cmos4000 10 | LIBS:adc-dac 11 | LIBS:memory 12 | LIBS:xilinx 13 | LIBS:microcontrollers 14 | LIBS:dsp 15 | LIBS:microchip 16 | LIBS:analog_switches 17 | LIBS:motorola 18 | LIBS:texas 19 | LIBS:intel 20 | LIBS:audio 21 | LIBS:interface 22 | LIBS:digital-audio 23 | LIBS:philips 24 | LIBS:display 25 | LIBS:cypress 26 | LIBS:siliconi 27 | LIBS:opto 28 | LIBS:atmel 29 | LIBS:contrib 30 | LIBS:valves 31 | LIBS:OPAVES_components 32 | LIBS:stm32 33 | LIBS:battery_management 34 | LIBS:logo 35 | LIBS:motor_drivers 36 | LIBS:nordicsemi 37 | LIBS:nxp_armmcu 38 | LIBS:powerint 39 | LIBS:Power_Management 40 | LIBS:references 41 | LIBS:silabs 42 | LIBS:stm8 43 | LIBS:switches 44 | LIBS:transf 45 | LIBS:video 46 | LIBS:Worldsemi 47 | LIBS:Xicor 48 | LIBS:Zilog 49 | LIBS:template-cache 50 | LIBS:MK2-cache 51 | EELAYER 25 0 52 | EELAYER END 53 | $Descr A4 11693 8268 54 | encoding utf-8 55 | Sheet 2 6 56 | Title "O'PAVES Mk-II" 57 | Date "" 58 | Rev "B" 59 | Comp "AdaCore" 60 | Comment1 "Licensed under CERN OHL v.1.2 or later" 61 | Comment2 "" 62 | Comment3 "" 63 | Comment4 "" 64 | $EndDescr 65 | $Comp 66 | L Pololu_TB6612 U1 67 | U 1 1 59887112 68 | P 5400 2650 69 | F 0 "U1" H 5750 2450 60 0000 C CNN 70 | F 1 "Pololu_TB6612" H 5450 1750 60 0000 C CNN 71 | F 2 "OPAVES_Footprints:Pololu_TB6612" H 6500 2000 60 0001 C CNN 72 | F 3 "" H 6500 2000 60 0001 C CNN 73 | 1 5400 2650 74 | 1 0 0 -1 75 | $EndComp 76 | Text HLabel 5550 2450 1 59 Input ~ 0 77 | VMOTOR 78 | Text HLabel 5250 2450 1 59 Input ~ 0 79 | VLOGIC 80 | Text HLabel 4600 2850 0 59 Input ~ 0 81 | PWMA 82 | Text HLabel 4600 3300 0 59 Input ~ 0 83 | PWMB 84 | Text HLabel 4600 3150 0 59 Input ~ 0 85 | IN1 86 | Text HLabel 4600 3450 0 59 Input ~ 0 87 | IN1 88 | Text HLabel 4600 3600 0 59 Input ~ 0 89 | IN2 90 | Text HLabel 4600 3000 0 59 Input ~ 0 91 | IN2 92 | $Comp 93 | L GND #PWR02 94 | U 1 1 59887758 95 | P 5400 4250 96 | F 0 "#PWR02" H 5400 4000 50 0001 C CNN 97 | F 1 "GND" H 5400 4100 50 0000 C CNN 98 | F 2 "" H 5400 4250 50 0000 C CNN 99 | F 3 "" H 5400 4250 50 0000 C CNN 100 | 1 5400 4250 101 | 1 0 0 -1 102 | $EndComp 103 | Wire Wire Line 104 | 5400 4250 5400 4150 105 | Wire Wire Line 106 | 5250 4150 5550 4150 107 | Connection ~ 5400 4150 108 | Text HLabel 4600 3750 0 59 Input ~ 0 109 | Standby 110 | Wire Wire Line 111 | 6150 3050 6800 3050 112 | Wire Wire Line 113 | 6150 3250 6900 3250 114 | Wire Wire Line 115 | 6150 3350 6800 3350 116 | Text Label 6250 3050 0 59 ~ 0 117 | MOTOR_A1 118 | Text Label 6250 3150 0 59 ~ 0 119 | MOTOR_A2 120 | Text Label 6250 3250 0 59 ~ 0 121 | MOTOR_B2 122 | Text Label 6250 3350 0 59 ~ 0 123 | MOTOR_B1 124 | $Comp 125 | L CONN_01X02 Motor_Left1 126 | U 1 1 5A0F32AD 127 | P 7350 2950 128 | F 0 "Motor_Left1" H 7350 3100 50 0000 C CNN 129 | F 1 "CONN_01X02" H 7350 2800 50 0000 C CNN 130 | F 2 "Pin_Headers:Pin_Header_Straight_1x02" H 7350 2950 50 0001 C CNN 131 | F 3 "" H 7350 2950 50 0000 C CNN 132 | 1 7350 2950 133 | 1 0 0 -1 134 | $EndComp 135 | $Comp 136 | L CONN_01X02 Motor_Right1 137 | U 1 1 5A0F331A 138 | P 7350 3450 139 | F 0 "Motor_Right1" H 7350 3600 50 0000 C CNN 140 | F 1 "CONN_01X02" H 7350 3300 50 0000 C CNN 141 | F 2 "Pin_Headers:Pin_Header_Straight_1x02" H 7350 3450 50 0001 C CNN 142 | F 3 "" H 7350 3450 50 0000 C CNN 143 | 1 7350 3450 144 | 1 0 0 -1 145 | $EndComp 146 | Wire Wire Line 147 | 6900 3250 6900 3400 148 | Wire Wire Line 149 | 6900 3400 7150 3400 150 | Wire Wire Line 151 | 6800 3350 6800 3500 152 | Wire Wire Line 153 | 6800 3500 7150 3500 154 | Wire Wire Line 155 | 6800 3050 6800 2900 156 | Wire Wire Line 157 | 6800 2900 7150 2900 158 | Wire Wire Line 159 | 6150 3150 6900 3150 160 | Wire Wire Line 161 | 6900 3150 6900 3000 162 | Wire Wire Line 163 | 6900 3000 7150 3000 164 | $EndSCHEMATC 165 | -------------------------------------------------------------------------------- /hardware/electronic/footprints.pretty/Pololu_TB6612.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Pololu_TB6612 (layer F.Cu) (tedit 59886585) 2 | (fp_text reference REF** (at 0.508 -2.286) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value Pololu_TB6612 (at 3.556 -3.302) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_text user GND (at 9.652 17.78) (layer F.SilkS) 9 | (effects (font (size 1 1) (thickness 0.15))) 10 | ) 11 | (fp_text user PWMB (at 9.144 15.24) (layer F.SilkS) 12 | (effects (font (size 1 1) (thickness 0.15))) 13 | ) 14 | (fp_text user BIN2 (at 9.652 12.7) (layer F.SilkS) 15 | (effects (font (size 1 1) (thickness 0.15))) 16 | ) 17 | (fp_text user BIN1 (at 9.652 10.16) (layer F.SilkS) 18 | (effects (font (size 1 1) (thickness 0.15))) 19 | ) 20 | (fp_text user NSTBY (at 8.89 7.62) (layer F.SilkS) 21 | (effects (font (size 1 1) (thickness 0.15))) 22 | ) 23 | (fp_text user AIN1 (at 9.652 5.08) (layer F.SilkS) 24 | (effects (font (size 1 1) (thickness 0.15))) 25 | ) 26 | (fp_text user AIN2 (at 9.652 2.54) (layer F.SilkS) 27 | (effects (font (size 1 1) (thickness 0.15))) 28 | ) 29 | (fp_text user PWMA (at 9.398 0) (layer F.SilkS) 30 | (effects (font (size 1 1) (thickness 0.15))) 31 | ) 32 | (fp_text user GND (at 3.048 17.78) (layer F.SilkS) 33 | (effects (font (size 1 1) (thickness 0.15))) 34 | ) 35 | (fp_text user VMOT (at 3.556 15.24) (layer F.SilkS) 36 | (effects (font (size 1 1) (thickness 0.15))) 37 | ) 38 | (fp_text user BO1 (at 3.048 12.7) (layer F.SilkS) 39 | (effects (font (size 1 1) (thickness 0.15))) 40 | ) 41 | (fp_text user BO2 (at 3.048 10.16) (layer F.SilkS) 42 | (effects (font (size 1 1) (thickness 0.15))) 43 | ) 44 | (fp_text user AO2 (at 3.048 7.62) (layer F.SilkS) 45 | (effects (font (size 1 1) (thickness 0.15))) 46 | ) 47 | (fp_text user AO1 (at 3.048 5.08) (layer F.SilkS) 48 | (effects (font (size 1 1) (thickness 0.15))) 49 | ) 50 | (fp_text user VCC (at 3.048 2.54) (layer F.SilkS) 51 | (effects (font (size 1 1) (thickness 0.15))) 52 | ) 53 | (fp_text user GND (at 3.048 0) (layer F.SilkS) 54 | (effects (font (size 1 1) (thickness 0.15))) 55 | ) 56 | (fp_line (start -1.524 19.304) (end -1.524 -1.524) (layer F.SilkS) (width 0.15)) 57 | (fp_line (start 14.224 19.304) (end -1.524 19.304) (layer F.SilkS) (width 0.15)) 58 | (fp_line (start 14.224 -1.524) (end 14.224 19.304) (layer F.SilkS) (width 0.15)) 59 | (fp_line (start -1.524 -1.524) (end 14.224 -1.524) (layer F.SilkS) (width 0.15)) 60 | (pad 1 thru_hole circle (at 0 0) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 61 | (pad 2 thru_hole circle (at 0 2.54) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 62 | (pad 3 thru_hole circle (at 0 5.08) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 63 | (pad 4 thru_hole circle (at 0 7.62) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 64 | (pad 5 thru_hole circle (at 0 10.16) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 65 | (pad 6 thru_hole circle (at 0 12.7) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 66 | (pad 7 thru_hole circle (at 0 15.24) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 67 | (pad 8 thru_hole circle (at 0 17.78) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 68 | (pad 9 thru_hole circle (at 12.7 0) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 69 | (pad 10 thru_hole circle (at 12.7 2.54) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 70 | (pad 11 thru_hole circle (at 12.7 5.08) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 71 | (pad 12 thru_hole circle (at 12.7 7.62) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 72 | (pad 13 thru_hole circle (at 12.7 10.16) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 73 | (pad 14 thru_hole circle (at 12.7 12.7) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 74 | (pad 15 thru_hole circle (at 12.7 15.24) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 75 | (pad 16 thru_hole circle (at 12.7 17.78) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask)) 76 | ) 77 | -------------------------------------------------------------------------------- /hardware/electronic/MK2/rev_A/gerber/MK2.TXT: -------------------------------------------------------------------------------- 1 | M48 2 | INCH,TZ 3 | T1C0.015 4 | T2C0.016 5 | T3C0.030 6 | T4C0.031 7 | T5C0.040 8 | T6C0.043 9 | T7C0.126 10 | T8C0.118 11 | T9C0.126 12 | T10C0.134 13 | % 14 | G90 15 | G05 16 | T1 17 | X65000Y-32835 18 | X65472Y-32835 19 | X66378Y-34213 20 | X66693Y-34055 21 | X67559Y-39922 22 | X67874Y-38898 23 | X69685Y-43425 24 | X70158Y-37559 25 | X70237Y-39055 26 | X70788Y-32520 27 | X70945Y-35984 28 | X72993Y-27953 29 | X73031Y-41102 30 | X73622Y-35197 31 | X74094Y-41102 32 | X74134Y-33386 33 | X74804Y-26142 34 | X75379Y-33712 35 | X76535Y-35157 36 | X78071Y-24055 37 | X78504Y-24055 38 | X79134Y-27795 39 | X79606Y-27795 40 | X81732Y-40276 41 | X82835Y-35118 42 | X83622Y-35433 43 | T2 44 | X84252Y-32677 45 | X84252Y-33071 46 | X84252Y-33465 47 | X84341Y-35886 48 | X84508Y-34104 49 | X84646Y-32677 50 | X84646Y-33071 51 | X84646Y-33465 52 | X84783Y-35620 53 | X84841Y-34216 54 | X84843Y-34577 55 | X84864Y-36134 56 | X85039Y-33071 57 | X85433Y-33071 58 | X85827Y-33071 59 | X86122Y-34252 60 | X86122Y-34646 61 | X86122Y-35039 62 | X86122Y-35433 63 | X86122Y-35827 64 | X86122Y-36220 65 | X87402Y-34449 66 | X87402Y-34843 67 | X87402Y-35236 68 | X87402Y-35630 69 | X87598Y-34252 70 | X87598Y-34646 71 | X87598Y-35039 72 | X87598Y-35433 73 | X87598Y-35827 74 | X88780Y-34252 75 | X88780Y-35630 76 | X88809Y-33465 77 | X88809Y-33858 78 | X88976Y-33268 79 | X88976Y-33661 80 | X88976Y-34055 81 | X88976Y-35827 82 | X89173Y-35630 83 | X89370Y-35827 84 | T3 85 | X16535Y-34976 86 | X16535Y-35976 87 | X16535Y-36976 88 | X16535Y-37976 89 | X16535Y-38976 90 | X16535Y-39976 91 | X16535Y-40976 92 | X18701Y-39764 93 | X18752Y-35922 94 | X19274Y-40583 95 | X19325Y-35103 96 | X19848Y-41402 97 | X19899Y-34284 98 | X20422Y-42221 99 | X20472Y-33465 100 | X20995Y-43040 101 | X21046Y-32645 102 | X21569Y-43860 103 | X21620Y-31826 104 | X22142Y-44679 105 | X22193Y-31007 106 | X67562Y-29232 107 | X68562Y-29232 108 | X69480Y-48937 109 | X69480Y-53937 110 | X69562Y-29232 111 | X70480Y-48937 112 | X70480Y-53937 113 | X70562Y-29232 114 | X71480Y-48937 115 | X71480Y-53937 116 | X72480Y-48937 117 | X72480Y-53937 118 | X73480Y-48937 119 | X73480Y-53937 120 | X73520Y-22244 121 | X74480Y-48937 122 | X74480Y-53937 123 | X74520Y-22244 124 | X75480Y-48937 125 | X75480Y-53937 126 | X75520Y-22244 127 | X76027Y-29213 128 | X76480Y-48937 129 | X76480Y-53937 130 | X76520Y-22244 131 | X77027Y-29213 132 | X77520Y-22244 133 | X78027Y-29213 134 | X78520Y-22244 135 | X79027Y-29213 136 | X79520Y-22244 137 | X88276Y-32488 138 | X88276Y-37409 139 | X106496Y-34992 140 | X106496Y-35992 141 | X106496Y-36992 142 | X106496Y-37992 143 | X106496Y-38992 144 | X106496Y-39992 145 | X106496Y-40992 146 | T4 147 | X61882Y-34717 148 | X61882Y-35717 149 | X61882Y-36717 150 | X61882Y-37717 151 | X61882Y-38717 152 | X61882Y-39717 153 | X61882Y-40717 154 | X61882Y-41717 155 | X61882Y-42717 156 | X64882Y-34717 157 | X64882Y-35717 158 | X64882Y-36717 159 | X64882Y-37717 160 | X64882Y-38717 161 | X64882Y-39717 162 | X64882Y-40717 163 | X64882Y-41717 164 | X64882Y-42717 165 | X69001Y-34373 166 | X69001Y-35161 167 | X69001Y-35948 168 | X69001Y-36736 169 | X69001Y-37523 170 | X69001Y-38310 171 | X69001Y-39098 172 | X69001Y-39885 173 | X69001Y-40673 174 | X69001Y-41460 175 | X77663Y-34373 176 | X77663Y-35161 177 | X77663Y-35948 178 | X77663Y-36736 179 | X77663Y-37523 180 | X77663Y-38310 181 | X77663Y-39098 182 | X77663Y-39885 183 | X77663Y-40673 184 | X77663Y-41460 185 | T5 186 | X21063Y-36992 187 | X21063Y-37992 188 | X21063Y-38992 189 | X55700Y-25200 190 | X56700Y-25200 191 | X57700Y-25200 192 | X61969Y-29748 193 | X61969Y-30748 194 | X61969Y-31748 195 | X61969Y-32748 196 | X99152Y-48545 197 | X100152Y-48545 198 | X101152Y-48545 199 | X102152Y-48545 200 | T6 201 | X48980Y-23331 202 | X48980Y-25300 203 | X50240Y-23331 204 | X50240Y-25300 205 | X51500Y-23331 206 | X51500Y-25300 207 | X52760Y-23331 208 | X52760Y-25300 209 | T7 210 | X17126Y-32480 211 | X17126Y-43504 212 | X42224Y-25000 213 | X42224Y-50984 214 | X60728Y-25000 215 | X60728Y-50984 216 | X82776Y-25000 217 | X82776Y-50984 218 | X105315Y-28543 219 | X105315Y-47441 220 | T8 221 | X95362Y-29339 222 | X95362Y-47055 223 | T9 224 | X95354Y-26181 225 | X95354Y-49803 226 | T10 227 | X26476Y-32087 228 | X26476Y-43898 229 | X29626Y-32087 230 | X29626Y-43898 231 | T0 232 | M30 233 | -------------------------------------------------------------------------------- /software/src/databases-generics.ads: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------ 2 | -- -- 3 | -- O'PAVES -- 4 | -- -- 5 | -- Copyright (C) 2017, AdaCore -- 6 | -- -- 7 | -- This program is free software; you can redistribute it and/or modify it -- 8 | -- under terms of the GNU General Public License as published by the Free -- 9 | -- Software Foundation; either version 3, or (at your option) any later -- 10 | -- version. This software is distributed in the hope that it will be useful -- 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 12 | -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- 13 | -- License for more details. You should have received a copy of the GNU -- 14 | -- General Public License distributed with this software; see file -- 15 | -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- 16 | -- of the license. -- 17 | ------------------------------------------------------------------------------ 18 | 19 | with Ada.Real_Time; use Ada.Real_Time; 20 | with Databases; use Databases; 21 | 22 | generic 23 | type Data_Type is private; 24 | -- The data type that should be stored in the database 25 | 26 | Init_Data : Data_Type; 27 | -- The value that should be set just after the data registration 28 | 29 | Max_Nb_Data : Positive; 30 | -- The maximun number of data that can be stored in the database 31 | 32 | with function Image (Data : Data_Type) return String; 33 | 34 | with function Value (Image : String) return Data_Type; 35 | 36 | package Databases.Generics is 37 | 38 | type Database_Type is new Root_Database_Type with private; 39 | type Database_Access is access all Database_Type'Class; 40 | -- Database types for the given Data_Type. 41 | 42 | function Get_Database_Instance return Database_Access; 43 | -- Return the unique database instance for this package. 44 | -- Use this function in order to get/set values of the given Data_Type. 45 | 46 | function Get 47 | (Database : Database_Type; 48 | Data_ID : Data_ID_Type) return Data_Type; 49 | -- Get the currently set value for given Data_ID 50 | 51 | function Get_Timestamp 52 | (Database : Database_Type; 53 | Data_ID : Data_ID_Type) return Time; 54 | 55 | procedure Set 56 | (Database : in out Database_Type; 57 | Data_ID : Data_ID_Type; 58 | Data : Data_Type); 59 | -- Set a value for the given Data_ID 60 | 61 | overriding function Register 62 | (Database : in out Database_Type; 63 | Data_Name : Data_Name_Type) return Data_ID_Type; 64 | 65 | overriding function Get_ID 66 | (Database : Database_Type) return Database_ID_Type; 67 | 68 | overriding function Get_Data_ID 69 | (Database : Database_Type; 70 | Data_Name : Data_Name_Type) return Data_ID_Type; 71 | 72 | overriding function Get 73 | (Database : Database_Type; 74 | Data_ID : Data_ID_Type) return String; 75 | 76 | overriding procedure Set 77 | (Database : in out Database_Type; 78 | Data_ID : Data_ID_Type; 79 | Image : String); 80 | 81 | overriding procedure Log_All_Data (Database : Database_Type); 82 | 83 | overriding procedure Clear_All_Data (Database : in out Database_Type); 84 | 85 | private 86 | 87 | type Data_Object is record 88 | Data : Data_Type; 89 | Timestamp : Ada.Real_Time.Time; 90 | end record; 91 | 92 | type Data_Object_Array is 93 | array (First_Data_ID .. Data_ID_Type (Max_Nb_Data)) of Data_Object; 94 | 95 | type Data_Name_Array is 96 | array (First_Data_ID .. Data_ID_Type (Max_Nb_Data)) of Data_Name_Type; 97 | 98 | type Database_Type is new Root_Database_Type with record 99 | ID : Database_ID_Type := Get_New_Database_ID; 100 | Data_Objects_Map : Data_Object_Array; 101 | Data_Names : Data_Name_Array; 102 | end record; 103 | 104 | Database_Instance : aliased Database_Type; 105 | 106 | end Databases.Generics; 107 | --------------------------------------------------------------------------------