This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| df = pd.read_excel(r"C:\Rhythm\test_ds_loc.xlsx") | |
| unique_subjects = df['p_id'].unique() | |
| for subject in unique_subjects: | |
| test_subject_df = df[df['p_id'] == subject].sort_values(by='date') | |
| train_df = df[df['p_id'] != subject] | |
| n = len(test_subject_df) | |
| if n < 3: | |
| continue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // -------------------- Payload preparation -------------------- | |
| // Format: little-endian float32 (°C), to match the decodeUplink() shown. | |
| static void prepareTxFrame(void) { | |
| float t = temperatureRead(); // ESP32 on-die sensor (not ambient) | |
| last_temp_cX100 = (int16_t) lroundf(t * 100.0f); // keep your existing status display state | |
| // Serialize float32 to little-endian bytes explicitly | |
| static_assert(sizeof(float) == 4, "float must be 4 bytes (IEEE-754)"); | |
| uint32_t raw; | |
| memcpy(&raw, &t, sizeof(raw)); |
OlderNewer