~xdavidwu/motion-control

bbe1455e407fdd3e912ba0df48ca3c6852b4097b — Pinghao Wu 3 months ago 139e167
squats: avoid tail linebreak on ttys
1 files changed, 8 insertions(+), 1 deletions(-)

M cmd/squats/main+joycon.ha
M cmd/squats/main+joycon.ha => cmd/squats/main+joycon.ha +8 -1
@@ 1,3 1,4 @@
use bufio;
use errors;
use fmt;
use sensors::joycon;


@@ 55,12 56,18 @@ export fn main() void = {
				count += 1;
			};

			fmt::println(switch (s) {
			fmt::print(switch (s) {
			case status::UP => yield 'U';
			case status::DOWN => yield 'D';
			case status::IDLE => yield 'X';
			}, count / 2)!;

			if (screen) {
				bufio::flush(os::stdout)!;
			} else {
				fmt::println()!;
			};

		};
	};
};