From 6d7e7f14b59eaeb84a05de5f8a368561317a08cc Mon Sep 17 00:00:00 2001 From: "Timur A. Fatkhullin" Date: Fri, 13 Dec 2024 14:17:50 +0300 Subject: [PATCH] ... --- raptor_eagle_ccd.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/raptor_eagle_ccd.cpp b/raptor_eagle_ccd.cpp index 1c6c5d5..7dc21a0 100644 --- a/raptor_eagle_ccd.cpp +++ b/raptor_eagle_ccd.cpp @@ -327,15 +327,15 @@ bool RaptorEagleCCD::initCamera(int unitmap) std::format("pxd_serialConfigure({}, 0, {}, {}, 0, {}, 0, 0, 0)", _cameraUnitmap, CL_DEFAULT_BAUD_RATE, CL_DEFAULT_DATA_BITS, CL_DEFAULT_STOP_BIT)); - bool ok = resetMicro(); + bool ok = resetFPGA(); if (!ok) { - logError("Cannot reset microcontroller!"); + logError("Cannot reboot FPGA!"); return ok; } - ok = resetFPGA(); + ok = resetMicro(); if (!ok) { - logError("Cannot reboot FPGA!"); + logError("Cannot reset microcontroller!"); return ok; } @@ -592,7 +592,7 @@ bool RaptorEagleCCD::resetMicro(const std::chrono::milliseconds& timeout) tm = std::chrono::milliseconds(MICRO_RESET_DEFAULT_TIMEOUT); } - byte_seq_t ack; + byte_seq_t ack(1); std::chrono::milliseconds::rep cnt = (tm - MICRO_RESET_TIME_CONSTANT).count(); std::chrono::milliseconds sleep_dur = cnt > 10 ? std::chrono::milliseconds(cnt / 10) : std::chrono::milliseconds(10); @@ -611,8 +611,8 @@ bool RaptorEagleCCD::resetMicro(const std::chrono::milliseconds& timeout) auto start = std::chrono::steady_clock::now(); do { // poll camera with 'set-system-status' - // clWrite({0x4F, 0x51}); - clWrite({0x4F, 0x50}); + clWrite({0x4F, 0x51}); + //clWrite({0x4F, 0x50}); std::this_thread::sleep_for(sleep_dur); clRead(ack);