<html>
<head>
<meta name="generator" content="Windows Mail 17.5.9600.20689">
<style type="text/css"><!--html { font-family: "Color Emoji", "Calibri", "Segoe UI", "Meiryo", "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "sans-serif"; }--></style><style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}
p.MsoNormal, li.MsoNormal, div.MsoNormal {
margin:0in;
margin-bottom:.0001pt;
}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst,
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle,
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style></head>
<body dir="ltr">
<div data-externalstyle="false" dir="ltr" style="font-family: 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif';font-size:12pt;"><div>I tested your patch with a manual merge fix & added an exception to pass the tests. I can't tell any difference performance wise, so I think we should check in your shorter version without the cache since it's a bit easier to read.</div><div><br></div><div>If you have the other 2 patches too, that's great! I managed to get 1-999 working, but didn't include a fix for 000.</div><div><br></div><div>Exception I added to remove_memory_from_mapping:</div><div> if self._radio._memobj.banks[bank.index].memory[number].get_bits(mask) != mask:<br> raise Exception("Memory {num} is " +<br> "not in bank {bank}".format(num=memory.number,<br> bank=bank))<br></div><div><br></div><div><br></div><div>Here's what I was considering as a bank UI fix, but I wasn't confident it wouldn't break banks for another radio with memories labeled from ‘0’:</div><div><br></div><div>diff -r 9bc3cda2e2eb chirpui/bankedit.py<br>--- a/chirpui/bankedit.py Sat Jan 10 16:05:27 2015 -0800<br>+++ b/chirpui/bankedit.py Sat Jan 10 17:41:00 2015 -0800<br>@@ -156,7 +156,7 @@<br> iter = self._store.iter_next(iter)</div><div><br></div><div> index_bounds = self._model.get_index_bounds()<br>- num_indexes = index_bounds[1] - index_bounds[0]<br>+ num_indexes = index_bounds[1] - index_bounds[0] + 1 # should be inclusi<br>ve<br> indexes.sort()<br> for i in range(0, num_indexes):<br> if i not in indexes:<br>@@ -335,7 +335,9 @@<br> sw.add(self._view)<br> self._view.show()</div><div><br></div><div>- for i in range(*self._rf.memory_bounds):<br>+ lowerbound = self._rf.memory_bounds[0]<br>+ upperbound = self._rf.memory_bounds[1] + 1 # needs to be memory_bounds[<br>1] inclusive<br>+ for i in range(lowerbound, upperbound):<br> iter = self._store.append()<br> self._store.set(iter,<br> self.C_FILLED, False,<br>@@ -372,7 +374,9 @@<br> self.rthread.submit(job)</div><div><br></div><div> def refresh_all_memories(self):<br>- for i in range(*self._rf.memory_bounds):<br>+ lowerbound = self._rf.memory_bounds[0]<br>+ upperbound = self._rf.memory_bounds[1] + 1 # needs to be memory_bounds[<br>1] inclusive<br>+ for i in range(lowerbound,upperbound):<br> self.refresh_memory(i)</div><div><br></div><div> def refresh_mappings(self, and_memories=False):</div><div> </div><div><br></div><div data-signatureblock="true"><div><br></div><div>Sent from Windows Mail</div><div><br></div></div><div style="padding-top: 5px; border-top-color: rgb(229, 229, 229); border-top-width: 1px; border-top-style: solid;"><div><font face=" 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif'" style='line-height: 15pt; letter-spacing: 0.02em; font-family: "Calibri", "Segoe UI", "Meiryo", "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "sans-serif"; font-size: 12pt;'><b>From:</b> <a href="mailto:kosta@alumni.uvic.ca" target="_parent">Kosta Arvanitis</a><br><b>Sent:</b> Saturday, January 10, 2015 5:06 PM<br><b>To:</b> <a href="mailto:chirp_devel@intrepid.danplanet.com" target="_parent">chirp_devel@intrepid.danplanet.com</a></font></div></div><div><br></div><div dir=""><div id="readingPaneBodyContent">I looked over both patches, the look very similar. <br><br><br>There is also a known bug with the memory bounds on the FT-60 module; it is incorrectly specified to not include the 1000th memory bank. I have a separate fix for this as well.<br><br><br>In addition there is a bug with the BankEditor which is not inclusive of the memory bounds as well, so it also does not display the 1000th memory bank. I have a separate fix for this as well.<br><br><br>If its ok with Scott, given there is little diff. between the patches I would prefer to apply the one I submitted last week so that I can also submit the two subsequent patches as well which depend on it. <br><br><br><br>-kosta<br><br><br><br>________________________________<br>> From: stickpatrick@gmail.com <br>> To: chirp_devel@intrepid.danplanet.com <br>> Date: Sat, 10 Jan 2015 23:44:28 +0000 <br>> Subject: [chirp_devel] Re: Patch - [FT-60] Feature Request: Memory Bank <br>> Support #1945 <br>> <br>> I'm looking at Kosta's now. I took the same approach as the FT857 and <br>> lifted a lot of that code including the cache making it a bit harder to <br>> read. I’ll see if there's a perf difference or not. <br>> <br>> Dan - do you have any intention of using chirp_common.MTOBankModel in <br>> the future? Right now it's equivalent to chirp_common.BankModel but <br>> seems to be a better description of what's in the FT60 since any memory <br>> can be stored in 1 or more banks. <br>> <br>> Sent from Windows Mail <br>> <br>> From: Dan Smith<mailto:dsmith@danplanet.com> <br>> Sent: Saturday, January 10, 2015 3:43 PM <br>> To: chirp_devel@intrepid.danplanet.com<mailto:chirp_devel@intrepid.danplanet.com> <br>> <br>>> Can you guys look at each other's patches and decide which should be <br>>> applied? <br>> <br>> I applied Kosta's patch and it's failing one of the bank tests (see the <br>> test report from a few minutes ago). <br>> <br>> So, I'll revert it and let you guys work out which one should go in. <br>> Note that you should be able to run the tests locally and verify that <br>> the bank model(s) meet the requirements first. <br>> <br>> Thanks! <br>> <br>> --Dan <br>> <br>> <br>> _______________________________________________ chirp_devel mailing <br>> list chirp_devel@intrepid.danplanet.com <br>> http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer <br>> docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers <br>_______________________________________________<br>chirp_devel mailing list<br>chirp_devel@intrepid.danplanet.com<br>http://intrepid.danplanet.com/mailman/listinfo/chirp_devel<br>Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers</div></div></div>
</body>
</html>