From 3f3884e5138a274c5fffa69cb8c0b8642ce0cf9f Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Wed, 8 Mar 2023 20:41:45 +0100 Subject: [PATCH] comboctl-parser: Handle percent symbol in some TBR percentage screens Some TBR percentage screens like the Lithuanian one show a % symbol right after the text. Add an optional symbol parser to handle it. Signed-off-by: Carlos Rafael Giani --- .../commonMain/kotlin/info/nightscout/comboctl/parser/Parser.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/parser/Parser.kt b/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/parser/Parser.kt index c3bead098c..2c2d7be005 100644 --- a/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/parser/Parser.kt +++ b/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/parser/Parser.kt @@ -1240,6 +1240,7 @@ class TemporaryBasalRatePercentageScreenParser : Parser() { override fun parseImpl(parseContext: ParseContext): ParseResult { val parseResult = SequenceParser( listOf( + OptionalParser(SingleGlyphParser(Glyph.SmallSymbol(SmallSymbol.PERCENT))), SingleGlyphParser(Glyph.LargeSymbol(LargeSymbol.BASAL)), OptionalParser(IntegerParser()), // TBR percentage SingleGlyphParser(Glyph.LargeSymbol(LargeSymbol.PERCENT)),