no_std_generated_fixtures/tests/fixtures/
ntc_generated.rs1use ph_curves::{BoundaryBehavior, MonotonicDirection, ObservationGuardMetadata, PiecewiseLinearTransfer, TransferMetadata};
4
5#[rustfmt::skip]
6static NTC_10K_BETA_3950_INPUTS: [u16; 61] = [142, 152, 163, 175, 187, 200, 212, 226, 239, 254, 269, 285, 303, 320, 337, 357, 377, 398, 418, 441, 464, 512, 567, 625, 684, 749, 821, 887, 958, 1036, 1117, 1200, 1294, 1394, 1494, 1681, 1899, 2110, 2664, 2806, 2930, 3072, 3195, 3308, 3408, 3465, 3522, 3572, 3620, 3666, 3709, 3747, 3785, 3818, 3851, 3880, 3909, 3933, 3956, 3976, 3995];
7#[rustfmt::skip]
8static NTC_10K_BETA_3950_OUTPUTS: [i32; 61] = [124957, 122145, 119291, 116423, 113775, 111120, 108840, 106360, 104211, 101890, 99720, 97552, 95270, 93251, 91349, 89242, 87262, 85304, 83542, 81625, 79813, 76323, 72727, 69310, 66152, 62975, 59759, 57040, 54320, 51535, 48832, 46230, 43455, 40668, 38022, 33373, 28306, 23632, 11641, 8465, 5595, 2151, -1024, -4154, -7155, -8991, -10940, -12762, -14630, -16553, -18493, -20348, -22366, -24281, -26387, -28436, -30724, -32852, -35153, -37431, -39919];
9#[rustfmt::skip]
21pub const NTC_10K_BETA_3950: PiecewiseLinearTransfer<61> =
22PiecewiseLinearTransfer::new(&NTC_10K_BETA_3950_INPUTS, &NTC_10K_BETA_3950_OUTPUTS, MonotonicDirection::Decreasing)
23.with_boundaries(BoundaryBehavior::Error, BoundaryBehavior::Error);
24pub const NTC_10K_BETA_3950_METADATA: TransferMetadata = TransferMetadata {
26 input_unit: "adc_code",
27 output_unit: "degree_celsius",
28 output_scale: 1000,
29 domain_min: 142,
30 domain_max: 3995,
31 range_min: -39919,
32 range_max: 124957,
33 direction: MonotonicDirection::Decreasing,
34 knot_count: 61,
35 strictly_monotonic: true,
36 flat_segment_count: 0,
37 requested_max_error: 50,
38 achieved_max_error: 49,
39 worst_case_input: 539,
40 achieved_max_inverse_code_error: 0,
41};
42pub const NTC_10K_BETA_3950_OBSERVATION_GUARD: Option<ObservationGuardMetadata> = None;