From b723b3b8cacef7d772ba9cca3f0111bdebe95a5c Mon Sep 17 00:00:00 2001 From: fruchti Date: Sat, 23 May 2015 16:17:17 +0200 Subject: [PATCH] Always complete sensor signal sequence when started I started getting paper jam errors which was likely to be caused by communication between printer controller board and operator's panel toggling the tapped data line and therefore resetting the MCU board's state to the idle state while printing. If the state is reset before the signal sequence is completed, the printer of course will not get the sensor signals it is expecting. The line had been commented out because it had caused some weird problems in the past. For example, my printer now needs a hard reset after each print because it refuses to print a second time. As I think not being able to print at all is worse than that, I put the line back into the code. --- build/main.hex | 83 +++++++++++++++++++++++++------------------------- src/main.c | 4 +-- 2 files changed, 44 insertions(+), 43 deletions(-) diff --git a/build/main.hex b/build/main.hex index a4edee2..1604edd 100644 --- a/build/main.hex +++ b/build/main.hex @@ -1,10 +1,10 @@ -:100000001AC091C0A3C030C02FC02EC02DC02CC0BC +:100000001AC091C0A7C030C02FC02EC02DC02CC0B8 :100010002BC02AC029C028C027C027C025C024C0A3 -:1000200023C022C021C0DDC0ECC007C11BC129C153 -:1000300044C15EC177C111241FBECFEDCDBF10E01A -:10004000A0E6B0E0E0E6F3E002C005900D92A23633 +:1000200023C022C021C0E1C0F0C00BC11FC12DC13F +:1000300048C162C17BC111241FBECFEDCDBF10E00E +:10004000A0E6B0E0E8E6F3E002C005900D92A2362B :10005000B107D9F710E0A2E6B0E001C01D92A836C2 -:10006000B107E1F781D07AC1CBCF1F920F920FB6C3 +:10006000B107E1F785D07EC1CBCF1F920F920FB6BB :100070000F9211248F939F93AF93BF93809164004D :1000800090916500A0916600B09167000196A11D56 :10009000B11D8093640090936500A0936600B093B7 @@ -17,40 +17,41 @@ :1001000060008091600090916100069710F4959ACC :1001100001C09598BF91AF919F918F910F900FBEA5 :100120000F901F9018951F920F920FB60F921124E7 -:100130008F9380916300882319F081E0809363009E -:100140008F910F900FBE0F901F9018951F920F92D6 -:100150000FB60F92112410926100109260000F9060 -:100160000FBE0F901F9018958E9A8D9A8C9A969A22 -:10017000959A949AC09AC19AB99AC29ABA9AC39A0D -:10018000BB9ABC9A82E080BF83E083BF8CE786BFC6 -:1001900081E089BF85B7826085BF8BB780648BBFE4 -:1001A00085B7846085BF8BB780688BBF78941092C9 -:1001B0006400109265001092660010926700109221 -:1001C000630081E097E026E035E044E053E062E040 -:1001D000E0916300F0E0E830F105D0F7ED5EFF4F0D -:1001E0000994C0906400D0906500E0906600F090A3 -:1001F000670078E8C71673E1D706E104F10440F31D -:10020000AAC0C19AC29AC39A969AC4989498E09147 -:100210006000F09161003697D8F6B099D9CFC49AB2 -:10022000949A96986093630010926400109265000F -:100230001092660010926700CBCFC0906400D090FF -:100240006500E0906600F09067007EE4C7167DE0F0 -:10025000D706E104F10408F4BBCFC498C2985093C8 -:100260006300B6CFB09BB4CFC198969A1092640049 -:100270001092650010926600109267004093630030 -:10028000A7CFC0906400D0906500E0906600F09029 -:10029000670079E4C71673E0D706E104F10408F4B7 -:1002A00097CFC39810926400109265001092660078 -:1002B00010926700309363008BCFC0906400D090A1 -:1002C0006500E0906600F090670075EDC716D104F8 -:1002D000E104F10408F47CCFC29A109264001092F9 -:1002E000650010926600109267002093630070CF43 -:1002F000C0906400D0906500E0906600F0906700C8 -:1003000077E3C71671E0D706E104F10458F0C19A0B -:1003100010926400109265001092660010926700BF -:1003200090936300C0906400D0906500E0906600F8 -:10033000F090670071E5C71673E0D706E104F10499 -:1003400008F446CFC39A1092640010926500109290 -:10035000660010926700809363003ACFF894FFCF55 -:02036000060095 +:100130008F9380916300833021F08091630082303F +:1001400019F481E0809363008F910F900FBE0F90A0 +:100150001F9018951F920F920FB60F9211241092B4 +:100160006100109260000F900FBE0F901F901895C5 +:100170008E9A8D9A8C9A969A959A949AC09AC19AC8 +:10018000B99AC29ABA9AC39ABB9ABC9A82E080BFC3 +:1001900083E083BF8CE786BF81E089BF85B782603B +:1001A00085BF8BB780648BBF85B7846085BF8BB7F5 +:1001B00080688BBF78941092640010926500109252 +:1001C0006600109267001092630081E097E026E0DD +:1001D00035E044E053E062E0E0916300F0E0E830B5 +:1001E000F105D0F7ED5EFF4F0994C0906400D09008 +:1001F0006500E0906600F090670078E8C71673E14C +:10020000D706E104F10440F3AAC0C19AC29AC39A86 +:10021000969AC4989498E0916000F09161003697A6 +:10022000D8F6B099D9CFC49A949A969860936300FF +:1002300010926400109265001092660010926700A0 +:10024000CBCFC0906400D0906500E0906600F09045 +:1002500067007EE4C7167DE0D706E104F10408F4E8 +:10026000BBCFC498C29850936300B6CFB09BB4CFB5 +:10027000C198969A109264001092650010926600E0 +:100280001092670040936300A7CFC0906400D090A5 +:100290006500E0906600F090670079E4C71673E0AF +:1002A000D706E104F10408F497CFC39810926400D4 +:1002B0001092650010926600109267003093630000 +:1002C0008BCFC0906400D0906500E0906600F09005 +:1002D000670075EDC716D104E104F10408F47CCF82 +:1002E000C29A1092640010926500109266001092FB +:1002F00067002093630070CFC0906400D0906500C9 +:10030000E0906600F090670077E3C71671E0D706CB +:10031000E104F10458F0C19A109264001092650053 +:10032000109266001092670090936300C090640082 +:10033000D0906500E0906600F090670071E5C71608 +:1003400073E0D706E104F10408F446CFC39A109293 +:10035000640010926500109266001092670080930E +:0803600063003ACFF894FFCFCF +:0203680006008D :00000001FF diff --git a/src/main.c b/src/main.c index 62e12d7..461bf84 100644 --- a/src/main.c +++ b/src/main.c @@ -188,8 +188,8 @@ ISR(TIMER0_COMPA_vect) ISR(INT0_vect) { // Just reset everything - // if(State == WaitingForPaperIn || State == ClutchDelay) - if(State != PowerOnWait) + if(State == WaitingForPaperIn || State == ClutchDelay) + //if(State != PowerOnWait) { State = Idle; }