Skip to content

Commit bb89574

Browse files
committed
Merge branch 'develop' of github.com:bee-mar/mmpm
2 parents 6899e24 + 27439c4 commit bb89574

5 files changed

Lines changed: 13 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,7 @@
240240
# Version 2.03
241241

242242
- fixed small typos for the keyword `upgradeable`
243+
244+
# Version 2.04
245+
246+
- Bug fix (#44): fixed screen rotation from GUI due to key in dictionary not being cast to int from string

gui/src/app/components/magic-mirror-control-center/magic-mirror-control-center.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export class MagicMirrorControlCenterComponent implements OnInit {
189189
rows: 1,
190190
badge: null,
191191
url: URLS.POST.RASPBERRYPI.ROTATE_SCREEN,
192-
message: "The screen will be rotated with sudo permissions. The RaspberryPi must be restarted after",
192+
message: "The screen will be rotated with sudo permissions, and the RaspberryPi must be restarted to reflect changes.",
193193
disabled: false,
194194
dialogWidth: "50vw",
195195
},
@@ -234,7 +234,11 @@ export class MagicMirrorControlCenterComponent implements OnInit {
234234
if (!response) { return; }
235235

236236
this.api.rotateRaspberryPiScreen(value).then((error: any) => {
237-
if (error?.error) { this.snackbar.error(error.error); }
237+
if (error?.error) {
238+
this.snackbar.error(error.error);
239+
} else {
240+
this.snackbar.success("Screen rotation value updated. Please restart your RaspberryPi.");
241+
}
238242
});
239243
});
240244
});

mmpm/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2239,7 +2239,7 @@ def rotate_raspberrypi_screen(degrees: int, assume_yes: bool = False) -> str: #p
22392239
os.system(f'sudo cp {boot_config} {boot_config}.bak')
22402240
print(mmpm.consts.GREEN_CHECK_MARK)
22412241

2242-
desired_setting: int = rotation_map[degrees]
2242+
desired_setting: int = rotation_map[int(degrees)]
22432243

22442244
grep: subprocess.CompletedProcess = subprocess.run(['grep', '--color=never', 'display_rotate', boot_config], stdout=subprocess.PIPE)
22452245
output: str = grep.stdout.decode('utf-8').strip()

mmpm/mmpm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
MagicMirrorPackage = mmpm.models.MagicMirrorPackage
1616
get_env = mmpm.utils.get_env
1717

18-
__version__ = 2.03
18+
__version__ = 2.04
1919

2020

2121
def main(argv):

mmpm/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ def kill_magicmirror_processes() -> None:
533533

534534
processes = ['electron']
535535

536-
log.info('Killing processes associated with MagicMirror: {processes}')
536+
log.info(f'Killing processes associated with MagicMirror: {processes}')
537537

538538
for process in processes:
539539
kill_pids_of_process(process)

0 commit comments

Comments
 (0)