From eca3995481bb46d686fd5103854a5437d7f259ec Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 1 Jan 2017 21:00:25 -0500 Subject: [PATCH] Added a CRC check for read address, ensured CRC, lost data and record not found are initially reset. --- Components/1770/1770.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Components/1770/1770.cpp b/Components/1770/1770.cpp index 25582f18f..2ea36cdf4 100644 --- a/Components/1770/1770.cpp +++ b/Components/1770/1770.cpp @@ -768,6 +768,9 @@ void WD1770::posit_event(Event new_event_type) begin_type_3: update_status([] (Status &status) { status.type = Status::Three; + status.crc_error = false; + status.lost_data = false; + status.record_not_found = false; }); if(!has_motor_on_line() && !has_head_load_line()) goto type3_test_delay; @@ -820,6 +823,12 @@ void WD1770::posit_event(Event new_event_type) if(distance_into_section_ == 7) { + if(crc_generator_.get_value()) + { + update_status([] (Status &status) { + status.crc_error = true; + }); + } goto wait_for_command; } }