Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • bts_7200_current_sense
    • methods:
      • bts_7200_init(configuration)
        • configuration
          • Select Pin Address
          • Sense Pin Address
          • callback
        • initialize select pin as GPIO Output
        • initialize sense pin as GPIO Input, (adc)
        • periodically set up timers
          • every time timer goes off, we'll 
            • measure with sel 1 
            • measure with sel 2
            • update storage with that measurement
      • bts_7200_get_measurement()
        • returns whatever measurement is in its storage
  • lights_signal_lights_fsm
    • Uses blinkers to repeatedly raise events
    • Has a state machine implementing the.
    • inputs:
      • event names: signal_left_fsm_input, signal_right_fsm_input, hazard_fsm_input, sync
    • outputs:
      • signal_left_fsm_output
      • signal_right_fsm_output
      • signal_both_output, or you can raise a left_output and right_output...
  • blink_event_generator
    • uses soft_timers to repeatedly raise an event with a data field
    • inputs:
      • event_id
    • outputs:
      • raising that event_id with alternating data fields.

Events: 

eventsourcedestinationdata
FRONT_POWER_DISTRIBUTION_GPIO_EVENT_DRIVER_DISPLAYfront_power_distribution_can_rx_event_mapperfront_power_distribution_gpio1: on, 0: off
FRONT_POWER_DISTRIBUTION_GPIO_EVENT_STEERINGfront_power_distribution_can_rx_event_mapperfront_power_distribution_gpio1: on, 0: off
FRONT_POWER_DISTRIBUTION_GPIO_EVENT_CENTRE_CONSOLEfront_power_distribution_can_rx_event_mapperfront_power_distribution_gpio1: on, 0: off
FRONT_POWER_DISTRIBUTION_GPIO_EVENT_HEADLIGHTSfront_power_distribution_can_rx_event_mapperfront_power_distribution_gpio1: on, 0: off
FRONT_POWER_DISTRIBUTION_GPIO_EVENT_SIGNAL_LEFTblink_event_generatorfront_power_distribution_gpio1: on, 0: off
FRONT_POWER_DISTRIBUTION_GPIO_EVENT_SIGNAL_RIGHTblink_event_generatorfront_power_distribution_gpio1: on, 0: off
FRONT_POWER_DISTRIBUTION_GPIO_EVENT_SIGNAL_HAZARDblink_event_generatorfront_power_distribution_gpio1: on, 0: off
FRONT_POWER_DISTRIBUTION_SIGNAL_EVENT_LEFTfront_power_distribution_can_rx_event_mappersignal_lights_fsm1: on, 0: off
FRONT_POWER_DISTRIBUTION_SIGNAL_EVENT_RIGHTfront_power_distribution_can_rx_event_mappersignal_lights_fsm1: on, 0: off
FRONT_POWER_DISTRIBUTION_SIGNAL_EVENT_HAZARDfront_power_distribution_can_rx_event_mappersignal_lights_fsm1: on, 0: off
FRONT_POWER_DISTRIBUTION_CURRENT_SENSE_EVENT_DATA_READYfront_power_distribution_current_measurementfront_power_distribution_publish_dataempty

Incoming CAN Messages:

Message IDData FieldsExported Enums
SYSTEM_CAN_MESSAGE_FRONT_POWERuint16_t output_bitset, uint16_t state_bitsetEEFrontPowerDistributionOutput, EEFrontPowerDistributionOutputState
SYSTEM_CAN_MESSAGE_LIGHTSuint16_t light_type_bitset, uint16_t state_bitsetEELightType, EELightState
SYSTEM_CAN_MESSAGE_LIGHTS_SYNCempty
SYSTEM_CAN_MESSAGE_HORNuint8_t horn_stateEEHornState

...