Schmitt trigger with Comparator
There are two mistakes you made:

First, you should consider that the circuit has two independant parts: the comparator with hysteresis part, and the logic level translation part. So to calculate the feedback resistors and opamp input resistors, you can completely ignore the fact that the final output is in the -4.7/-8V range. Just consider the opamp output voltage (-8/+15) and the input thresholds you need. Then you'll add a resistor divider at a second stage to bring the output in the required MCU range, but that will be done later.

The second mistake is that the R2 resistor is tied to ground on your circuit. Finding a solution here is impossible, because the opamp + input voltage needs to be somewhere between the two rails, but not necessarily ground, given the thresholds you need. So you need a three-resistor network at the + input, one resistor going to the positive rail, one to the negative rail, and one to the output (the feedback). Then you can find a solution. For information, there is a good TI app note here giving all required formulas, so you don't have to recalculate them.

Here is the final circuit:







simulate this circuit &ndash; Schematic created using CircuitLab

And the formulas used to deduce the values:

\$\frac{Ry}{Rx} = \frac{Vl}{Vcc-Vh}\$

\$\frac{Rh}{Rx} = \frac{Vl}{Vh-Vl}\$

\$\frac{Rdy}{Rdx+Rdy} = \frac{Vout}{Vcc}\$

With Vh, Vl the hysteresis levels required, Vcc the supply voltage and Vout the required output high level (all these should be considered as voltage differences with respect to the negative opamp supply, so e.g. Vcc is 23V).