From 8a1ee5cd8030e9bb932a9d6f7b554e6555653d9a Mon Sep 17 00:00:00 2001 From: Ryan Klaassen Date: Wed, 10 Aug 2016 12:58:09 -0500 Subject: Replace LayoutJoin.cpp --- Layout/LayoutJoin.cpp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'Layout') diff --git a/Layout/LayoutJoin.cpp b/Layout/LayoutJoin.cpp index e115773..687437d 100644 --- a/Layout/LayoutJoin.cpp +++ b/Layout/LayoutJoin.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) <2016> , MIT License +/* /* Copyright (c) <2016> , MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without restriction, @@ -119,3 +119,31 @@ void LayoutJoin::displayCancel(bool display) { writeField(_fCancel, str, true); } +void LayoutJoin::updateJoinFsb(uint8_t band) { + char buf[8]; + size_t size; + + size = snprintf(buf, sizeof(buf), "%u", band); + writeField(_fFsb, buf, size, true); + size = snprintf(buf, sizeof(buf), " %u", band); + writeField(_fCancel, buf, size, true); +} + +void LayoutJoin::displayEditFsb(string rate, uint32_t power, uint8_t band, string key, string id){ + clear(); + startUpdate(); + + writeLabel(_lId); + writeLabel(_lKey); + writeLabel(_lFsb); + writeLabel(_lRate); + writeLabel(_lPower); + writeField(_fCountdown, string("Join"), true); + updateId(id); + updateKey(key); + updateJoinFsb(band); + updateRate(rate); + updatePower(power); + + endUpdate(); +} -- cgit v1.2.3