<commit_before>__max_num_config_instances: &max_num_config_instances 2

module_name: battery

parameters:
    - group: Battery Calibration
      definitions:
        BAT${i}_V_EMPTY:
            description:
                short: Empty cell voltage (5C load)
                long: |
                    Defines the voltage where a single cell of battery 1 is considered empty.
                    The voltage should be chosen before the steep dropoff to 2.8V. A typical
                    lithium battery can only be discharged down to 10% before it drops off
                    to a voltage level damaging the cells.

            type: float
            unit: V
            decimal: 2
            increment: 0.01
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [3.5, 3.5]

        BAT${i}_V_CHARGED:
            description:
                short: Full cell voltage (5C load)
                long: |
                    Defines the voltage where a single cell of battery 1 is considered full
                    under a mild load. This will never be the nominal voltage of 4.2V

            type: float
            unit: V
            decimal: 2
            increment: 0.01
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [4.05, 4.05]

        BAT${i}_V_LOAD_DROP:
            description:
                short: Voltage drop per cell on full throttle
                long: |
                    This implicitely defines the internal resistance
                    to maximum current ratio for battery 1 and assumes linearity.
                    A good value to use is the difference between the
                    5C and 20-25C load. Not used if BAT${i}_R_INTERNAL is
                    set.

            type: float
            unit: V
            min: 0.07
            max: 0.5
            decimal: 2
            increment: 0.01
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [0.3, 0.3]

        BAT${i}_R_INTERNAL:
            description:
                short: Explicitly defines the per cell internal resistance for battery ${i}
                long: |
                    If non-negative, then this will be used in place of
                    BAT${i}_V_LOAD_DROP for all calculations.

            type: float
            unit: Ohm
            min: -1.0
            max: 0.2
            decimal: 2
            increment: 0.01
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [-1.0, -1.0]

        BAT${i}_N_CELLS:
            description:
                short: Number of cells for battery ${i}.
                long: |
                    Defines the number of cells the attached battery consists of.

            type: enum
            values:
                2: 2S Battery
                3: 3S Battery
                4: 4S Battery
                5: 5S Battery
                6: 6S Battery
                7: 7S Battery
                8: 8S Battery
                9: 9S Battery
                10: 10S Battery
                11: 11S Battery
                12: 12S Battery
                13: 13S Battery
                14: 14S Battery
                15: 15S Battery
                16: 16S Battery
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [0, 0]

        BAT${i}_CAPACITY:
            description:
                short: Battery ${i} capacity.
                long: |
                    Defines the capacity of battery ${i} in mAh.
            type: float
            unit: mAh
            min: -1.0
            max: 100000
            decimal: 0
            increment: 50
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [-1.0, -1.0]

        BAT${i}_SOURCE:
            description:
                short: Battery ${i} monitoring source.
                long: |
                    This parameter controls the source of battery data. The value 'Power Module'
                    means that measurements are expected to come from a power module. If the value is set to
                    'External' then the system expects to receive mavlink battery status messages.
                    If the value is set to 'ESCs', the battery information are taken from the esc_status message.
            type: enum
            values:
                0: Power Module
                1: External
                2: ESCs
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [0, 0]
<commit_msg>battery: add requirements to ESCs as battery<commit_after>__max_num_config_instances: &max_num_config_instances 2

module_name: battery

parameters:
    - group: Battery Calibration
      definitions:
        BAT${i}_V_EMPTY:
            description:
                short: Empty cell voltage (5C load)
                long: |
                    Defines the voltage where a single cell of battery 1 is considered empty.
                    The voltage should be chosen before the steep dropoff to 2.8V. A typical
                    lithium battery can only be discharged down to 10% before it drops off
                    to a voltage level damaging the cells.

            type: float
            unit: V
            decimal: 2
            increment: 0.01
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [3.5, 3.5]

        BAT${i}_V_CHARGED:
            description:
                short: Full cell voltage (5C load)
                long: |
                    Defines the voltage where a single cell of battery 1 is considered full
                    under a mild load. This will never be the nominal voltage of 4.2V

            type: float
            unit: V
            decimal: 2
            increment: 0.01
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [4.05, 4.05]

        BAT${i}_V_LOAD_DROP:
            description:
                short: Voltage drop per cell on full throttle
                long: |
                    This implicitely defines the internal resistance
                    to maximum current ratio for battery 1 and assumes linearity.
                    A good value to use is the difference between the
                    5C and 20-25C load. Not used if BAT${i}_R_INTERNAL is
                    set.

            type: float
            unit: V
            min: 0.07
            max: 0.5
            decimal: 2
            increment: 0.01
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [0.3, 0.3]

        BAT${i}_R_INTERNAL:
            description:
                short: Explicitly defines the per cell internal resistance for battery ${i}
                long: |
                    If non-negative, then this will be used in place of
                    BAT${i}_V_LOAD_DROP for all calculations.

            type: float
            unit: Ohm
            min: -1.0
            max: 0.2
            decimal: 2
            increment: 0.01
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [-1.0, -1.0]

        BAT${i}_N_CELLS:
            description:
                short: Number of cells for battery ${i}.
                long: |
                    Defines the number of cells the attached battery consists of.

            type: enum
            values:
                2: 2S Battery
                3: 3S Battery
                4: 4S Battery
                5: 5S Battery
                6: 6S Battery
                7: 7S Battery
                8: 8S Battery
                9: 9S Battery
                10: 10S Battery
                11: 11S Battery
                12: 12S Battery
                13: 13S Battery
                14: 14S Battery
                15: 15S Battery
                16: 16S Battery
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [0, 0]

        BAT${i}_CAPACITY:
            description:
                short: Battery ${i} capacity.
                long: |
                    Defines the capacity of battery ${i} in mAh.
            type: float
            unit: mAh
            min: -1.0
            max: 100000
            decimal: 0
            increment: 50
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [-1.0, -1.0]

        BAT${i}_SOURCE:
            description:
                short: Battery ${i} monitoring source.
                long: |
                    This parameter controls the source of battery data. The value 'Power Module'
                    means that measurements are expected to come from a power module. If the value is set to
                    'External' then the system expects to receive mavlink battery status messages.
                    If the value is set to 'ESCs', the battery information are taken from the esc_status message.
                    This requires the ESC to provide both voltage as well as current.
            type: enum
            values:
                0: Power Module
                1: External
                2: ESCs
            reboot_required: true
            num_instances: *max_num_config_instances
            instance_start: 1
            default: [0, 0]

{'fraction_non_alphanumeric': 0.05019498050194981, 'fraction_numerical': 0.026597340265973404, 'mean_word_length': 1.2001759788825341, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4794714', 'n_tokens_mistral': 2696, 'n_tokens_neox': 2410, 'n_words': 912}