diff --git a/software/sys_controller/ossc/av_controller.c b/software/sys_controller/ossc/av_controller.c index 50ac1e9..e8e9d70 100644 --- a/software/sys_controller/ossc/av_controller.c +++ b/software/sys_controller/ossc/av_controller.c @@ -890,7 +890,7 @@ int main() // The input changed, so load the appropriate profile if (profile_sel != input_profiles[phy_input_sel]) { profile_sel = input_profiles[phy_input_sel]; - load_profile(); + read_userdata(profile_sel); } cm.avinput = target_mode; diff --git a/software/sys_controller/ossc/userdata.c b/software/sys_controller/ossc/userdata.c index a534d2a..bb23b6f 100644 --- a/software/sys_controller/ossc/userdata.c +++ b/software/sys_controller/ossc/userdata.c @@ -57,7 +57,6 @@ int write_userdata(alt_u8 entry) ((ude_initcfg*)databuf)->data_len = sizeof(ude_initcfg) - offsetof(ude_initcfg, last_profile); memcpy(((ude_initcfg*)databuf)->last_profile, input_profiles, sizeof(input_profiles)); ((ude_initcfg*)databuf)->last_input = cm.avinput; - ((ude_initcfg*)databuf)->last_phy_input = phy_input_sel; memcpy(((ude_initcfg*)databuf)->keys, rc_keymap, sizeof(rc_keymap)); retval = write_flash_page(databuf, sizeof(ude_initcfg), (USERDATA_OFFSET+entry*SECTORSIZE)/PAGESIZE); if (retval != 0) @@ -141,7 +140,7 @@ int read_userdata(alt_u8 entry) input_profiles[i] = ((ude_initcfg*)databuf)->last_profile[i]; if (((ude_initcfg*)databuf)->last_input < AV_LAST) target_mode = ((ude_initcfg*)databuf)->last_input; - profile_sel = input_profiles[((ude_initcfg*)databuf)->last_phy_input]; + profile_sel = input_profiles[0]; // Arbitrary default memcpy(rc_keymap, ((ude_initcfg*)databuf)->keys, sizeof(rc_keymap)); printf("RC data read (%u bytes)\n", sizeof(rc_keymap)); } diff --git a/software/sys_controller/ossc/userdata.h b/software/sys_controller/ossc/userdata.h index 4698102..507c57e 100644 --- a/software/sys_controller/ossc/userdata.h +++ b/software/sys_controller/ossc/userdata.h @@ -48,7 +48,6 @@ typedef struct { alt_u16 data_len; alt_u8 last_profile[3]; avinput_t last_input; - phyinput_t last_phy_input; alt_u16 keys[REMOTE_MAX_KEYS]; } __attribute__((packed, __may_alias__)) ude_initcfg;